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