public class SFTPClient extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
protected SFTPEngine |
engine |
protected org.slf4j.Logger |
log
Logger
|
protected SFTPFileTransfer |
xfer |
| Constructor and Description |
|---|
SFTPClient(SFTPEngine engine) |
protected final org.slf4j.Logger log
protected final SFTPEngine engine
protected final SFTPFileTransfer xfer
public SFTPClient(SFTPEngine engine)
public SFTPEngine getSFTPEngine()
public SFTPFileTransfer getFileTransfer()
public List<RemoteResourceInfo> ls(String path) throws IOException
IOExceptionpublic List<RemoteResourceInfo> ls(String path, RemoteResourceFilter filter) throws IOException
IOExceptionpublic RemoteFile open(String filename, Set<OpenMode> mode, FileAttributes attrs) throws IOException
IOExceptionpublic RemoteFile open(String filename, Set<OpenMode> mode) throws IOException
IOExceptionpublic RemoteFile open(String filename) throws IOException
IOExceptionpublic void mkdir(String dirname) throws IOException
IOExceptionpublic void mkdirs(String path) throws IOException
IOExceptionpublic FileAttributes statExistence(String path) throws IOException
IOExceptionpublic void rename(String oldpath, String newpath) throws IOException
IOExceptionpublic void rm(String filename) throws IOException
IOExceptionpublic void rmdir(String dirname) throws IOException
IOExceptionpublic void symlink(String linkpath, String targetpath) throws IOException
IOExceptionpublic int version()
public void setattr(String path, FileAttributes attrs) throws IOException
IOExceptionpublic int uid(String path) throws IOException
IOExceptionpublic int gid(String path) throws IOException
IOExceptionpublic long atime(String path) throws IOException
IOExceptionpublic long mtime(String path) throws IOException
IOExceptionpublic Set<FilePermission> perms(String path) throws IOException
IOExceptionpublic FileMode mode(String path) throws IOException
IOExceptionpublic FileMode.Type type(String path) throws IOException
IOExceptionpublic String readlink(String path) throws IOException
IOExceptionpublic FileAttributes stat(String path) throws IOException
IOExceptionpublic FileAttributes lstat(String path) throws IOException
IOExceptionpublic void chown(String path, int uid) throws IOException
IOExceptionpublic void chmod(String path, int perms) throws IOException
IOExceptionpublic void chgrp(String path, int gid) throws IOException
IOExceptionpublic void truncate(String path, long size) throws IOException
IOExceptionpublic String canonicalize(String path) throws IOException
IOExceptionpublic long size(String path) throws IOException
IOExceptionpublic void get(String source, String dest) throws IOException
IOExceptionpublic void put(String source, String dest) throws IOException
IOExceptionpublic void get(String source, LocalDestFile dest) throws IOException
IOExceptionpublic void put(LocalSourceFile source, String dest) throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2009–2014. All rights reserved.