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 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() |
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 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
SSHException
public SFTPEngine(SessionFactory ssh, java.lang.String pathSep) throws SSHException
SSHException
public SFTPEngine init() throws java.io.IOException
java.io.IOException
public Session.Subsystem getSubsystem()
public int getOperativeProtocolVersion()
public Request newExtendedRequest(java.lang.String reqName)
public PathHelper getPathHelper()
getPathHelper
in interface Requester
public Request newRequest(PacketType type)
newRequest
in interface Requester
public 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.IOException
public RemoteFile open(java.lang.String filename, java.util.Set<OpenMode> modes) throws java.io.IOException
java.io.IOException
public RemoteFile open(java.lang.String filename) throws java.io.IOException
java.io.IOException
public RemoteDirectory openDir(java.lang.String path) throws java.io.IOException
java.io.IOException
public void setAttributes(java.lang.String path, FileAttributes attrs) throws java.io.IOException
java.io.IOException
public java.lang.String readLink(java.lang.String path) throws java.io.IOException
java.io.IOException
public void makeDir(java.lang.String path, FileAttributes attrs) throws java.io.IOException
java.io.IOException
public void makeDir(java.lang.String path) throws java.io.IOException
java.io.IOException
public void symlink(java.lang.String linkpath, java.lang.String targetpath) throws java.io.IOException
java.io.IOException
public void remove(java.lang.String filename) throws java.io.IOException
java.io.IOException
public void removeDir(java.lang.String path) throws java.io.IOException
java.io.IOException
public FileAttributes stat(java.lang.String path) throws java.io.IOException
java.io.IOException
public FileAttributes lstat(java.lang.String path) throws java.io.IOException
java.io.IOException
public void rename(java.lang.String oldPath, java.lang.String newPath) throws java.io.IOException
java.io.IOException
public java.lang.String canonicalize(java.lang.String path) throws java.io.IOException
java.io.IOException
public void setTimeoutMs(int timeoutMs)
public int getTimeoutMs()
getTimeoutMs
in interface Requester
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
protected FileAttributes stat(PacketType pt, java.lang.String path) throws java.io.IOException
java.io.IOException
protected static java.lang.String readSingleName(Response res) throws java.io.IOException
java.io.IOException
protected void transmit(SFTPPacket<Request> payload) throws java.io.IOException
java.io.IOException