public class

SFTPClient

extends Object
implements Closeable
java.lang.Object
   ↳ net.schmizz.sshj.sftp.SFTPClient
Known Direct Subclasses

Summary

Fields
protected final SFTPEngine engine
protected final Logger log Logger
protected final SFTPFileTransfer xfer
Public Constructors
SFTPClient(SFTPEngine engine)
Public Methods
long atime(String path)
String canonicalize(String path)
void chgrp(String path, int gid)
void chmod(String path, int perms)
void chown(String path, int uid)
void close()
void get(String source, LocalDestFile dest)
void get(String source, String dest)
SFTPFileTransfer getFileTransfer()
SFTPEngine getSFTPEngine()
int gid(String path)
List<RemoteResourceInfo> ls(String path)
List<RemoteResourceInfo> ls(String path, RemoteResourceFilter filter)
FileAttributes lstat(String path)
void mkdir(String dirname)
void mkdirs(String path)
FileMode mode(String path)
long mtime(String path)
RemoteFile open(String filename, Set<OpenMode> mode)
RemoteFile open(String filename)
RemoteFile open(String filename, Set<OpenMode> mode, FileAttributes attrs)
Set<FilePermission> perms(String path)
void put(LocalSourceFile source, String dest)
void put(String source, String dest)
String readlink(String path)
void rename(String oldpath, String newpath)
void rm(String filename)
void rmdir(String dirname)
void setattr(String path, FileAttributes attrs)
long size(String path)
FileAttributes stat(String path)
FileAttributes statExistence(String path)
void symlink(String linkpath, String targetpath)
void truncate(String path, long size)
FileMode.Type type(String path)
int uid(String path)
int version()
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.io.Closeable

Fields

protected final SFTPEngine engine

protected final Logger log

Logger

protected final SFTPFileTransfer xfer

Public Constructors

public SFTPClient (SFTPEngine engine)

Parameters
engine

Public Methods

public long atime (String path)

Parameters
path
Throws
IOException

public String canonicalize (String path)

Parameters
path
Throws
IOException

public void chgrp (String path, int gid)

Parameters
path
gid
Throws
IOException

public void chmod (String path, int perms)

Parameters
path
perms
Throws
IOException

public void chown (String path, int uid)

Parameters
path
uid
Throws
IOException

public void close ()

Throws
IOException

public void get (String source, LocalDestFile dest)

Parameters
source
dest
Throws
IOException

public void get (String source, String dest)

Parameters
source
dest
Throws
IOException

public SFTPFileTransfer getFileTransfer ()

public SFTPEngine getSFTPEngine ()

public int gid (String path)

Parameters
path
Throws
IOException

public List<RemoteResourceInfo> ls (String path)

Parameters
path
Throws
IOException

public List<RemoteResourceInfo> ls (String path, RemoteResourceFilter filter)

Parameters
path
filter
Throws
IOException

public FileAttributes lstat (String path)

Parameters
path
Throws
IOException

public void mkdir (String dirname)

Parameters
dirname
Throws
IOException

public void mkdirs (String path)

Parameters
path
Throws
IOException

public FileMode mode (String path)

Parameters
path
Throws
IOException

public long mtime (String path)

Parameters
path
Throws
IOException

public RemoteFile open (String filename, Set<OpenMode> mode)

Parameters
filename
mode
Throws
IOException

public RemoteFile open (String filename)

Parameters
filename
Throws
IOException

public RemoteFile open (String filename, Set<OpenMode> mode, FileAttributes attrs)

Parameters
filename
mode
attrs
Throws
IOException

public Set<FilePermission> perms (String path)

Parameters
path
Throws
IOException

public void put (LocalSourceFile source, String dest)

Parameters
source
dest
Throws
IOException

public void put (String source, String dest)

Parameters
source
dest
Throws
IOException

public String readlink (String path)

Parameters
path
Throws
IOException

public void rename (String oldpath, String newpath)

Parameters
oldpath
newpath
Throws
IOException

public void rm (String filename)

Parameters
filename
Throws
IOException

public void rmdir (String dirname)

Parameters
dirname
Throws
IOException

public void setattr (String path, FileAttributes attrs)

Parameters
path
attrs
Throws
IOException

public long size (String path)

Parameters
path
Throws
IOException

public FileAttributes stat (String path)

Parameters
path
Throws
IOException

public FileAttributes statExistence (String path)

Parameters
path
Throws
IOException

public void symlink (String linkpath, String targetpath)

Parameters
linkpath
targetpath
Throws
IOException

public void truncate (String path, long size)

Parameters
path
size
Throws
IOException

public FileMode.Type type (String path)

Parameters
path
Throws
IOException

public int uid (String path)

Parameters
path
Throws
IOException

public int version ()