| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_TIMEOUT_MS |
protected org.slf4j.Logger |
log
Logger
|
static int |
MAX_SUPPORTED_VERSION |
protected int |
operativeVersion |
protected OutputStream |
out |
protected PathHelper |
pathHelper |
protected PacketReader |
reader |
protected long |
reqID |
protected Map<String,String> |
serverExtensions |
protected Session.Subsystem |
sub |
protected int |
timeoutMs |
| Constructor and Description |
|---|
SFTPEngine(SessionFactory ssh) |
SFTPEngine(SessionFactory ssh,
String pathSep) |
public static final int MAX_SUPPORTED_VERSION
public static final int DEFAULT_TIMEOUT_MS
protected final org.slf4j.Logger log
protected volatile int timeoutMs
protected final PathHelper pathHelper
protected final Session.Subsystem sub
protected final PacketReader reader
protected final OutputStream out
protected long reqID
protected int operativeVersion
public SFTPEngine(SessionFactory ssh) throws SSHException
SSHExceptionpublic SFTPEngine(SessionFactory ssh, String pathSep) throws SSHException
SSHExceptionpublic SFTPEngine init() throws IOException
IOExceptionpublic Session.Subsystem getSubsystem()
public int getOperativeProtocolVersion()
public PathHelper getPathHelper()
getPathHelper in interface Requesterpublic Request newRequest(PacketType type)
newRequest in interface Requesterpublic Promise<Response,SFTPException> request(Request req) throws IOException
request in interface RequesterIOExceptionpublic RemoteFile open(String path, Set<OpenMode> modes, FileAttributes fa) throws IOException
IOExceptionpublic RemoteFile open(String filename, Set<OpenMode> modes) throws IOException
IOExceptionpublic RemoteFile open(String filename) throws IOException
IOExceptionpublic RemoteDirectory openDir(String path) throws IOException
IOExceptionpublic void setAttributes(String path, FileAttributes attrs) throws IOException
IOExceptionpublic String readLink(String path) throws IOException
IOExceptionpublic void makeDir(String path, FileAttributes attrs) throws IOException
IOExceptionpublic void makeDir(String path) throws IOException
IOExceptionpublic void symlink(String linkpath, String targetpath) throws IOException
IOExceptionpublic void remove(String filename) throws IOException
IOExceptionpublic void removeDir(String path) throws IOException
IOExceptionpublic FileAttributes stat(String path) throws IOException
IOExceptionpublic FileAttributes lstat(String path) throws IOException
IOExceptionpublic void rename(String oldPath, String newPath) throws IOException
IOExceptionpublic String canonicalize(String path) throws IOException
IOExceptionpublic void setTimeoutMs(int timeoutMs)
public int getTimeoutMs()
getTimeoutMs in interface Requesterpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionprotected FileAttributes stat(PacketType pt, String path) throws IOException
IOExceptionprotected static String readSingleName(Response res) throws IOException
IOExceptionprotected void transmit(SFTPPacket<Request> payload) throws IOException
IOExceptionCopyright © 2009–2014. All rights reserved.