Package net.schmizz.sshj.sftp
Class StatefulSFTPClient
- java.lang.Object
-
- net.schmizz.sshj.sftp.SFTPClient
-
- net.schmizz.sshj.sftp.StatefulSFTPClient
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class StatefulSFTPClient extends SFTPClient
-
-
Field Summary
-
Fields inherited from class net.schmizz.sshj.sftp.SFTPClient
engine, log, xfer
-
-
Constructor Summary
Constructors Constructor Description StatefulSFTPClient(SessionFactory sessionFactory)
StatefulSFTPClient(SFTPEngine engine)
-
Method Summary
Modifier and Type Method Description java.lang.String
canonicalize(java.lang.String path)
void
cd(java.lang.String dirname)
void
get(java.lang.String source, java.lang.String dest)
void
get(java.lang.String source, LocalDestFile dest)
java.util.List<RemoteResourceInfo>
ls()
java.util.List<RemoteResourceInfo>
ls(java.lang.String path)
java.util.List<RemoteResourceInfo>
ls(java.lang.String path, RemoteResourceSelector selector)
java.util.List<RemoteResourceInfo>
ls(java.lang.String path, RemoteResourceFilter filter)
java.util.List<RemoteResourceInfo>
ls(RemoteResourceFilter filter)
FileAttributes
lstat(java.lang.String path)
void
mkdir(java.lang.String dirname)
void
mkdirs(java.lang.String path)
RemoteFile
open(java.lang.String filename)
RemoteFile
open(java.lang.String filename, java.util.Set<OpenMode> mode)
RemoteFile
open(java.lang.String filename, java.util.Set<OpenMode> mode, FileAttributes attrs)
void
put(java.lang.String source, java.lang.String dest)
void
put(LocalSourceFile source, java.lang.String dest)
java.lang.String
pwd()
java.lang.String
readlink(java.lang.String path)
void
rename(java.lang.String oldpath, java.lang.String newpath, java.util.Set<RenameFlags> renameFlags)
void
rm(java.lang.String filename)
void
rmdir(java.lang.String dirname)
void
setattr(java.lang.String path, FileAttributes attrs)
FileAttributes
stat(java.lang.String path)
FileAttributes
statExistence(java.lang.String path)
void
symlink(java.lang.String linkpath, java.lang.String targetpath)
void
truncate(java.lang.String path, long size)
-
-
-
Constructor Detail
-
StatefulSFTPClient
public StatefulSFTPClient(SFTPEngine engine) throws java.io.IOException
- Throws:
java.io.IOException
-
StatefulSFTPClient
public StatefulSFTPClient(SessionFactory sessionFactory) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
cd
public void cd(java.lang.String dirname) throws java.io.IOException
- Throws:
java.io.IOException
-
ls
public java.util.List<RemoteResourceInfo> ls() throws java.io.IOException
- Throws:
java.io.IOException
-
ls
public java.util.List<RemoteResourceInfo> ls(RemoteResourceFilter filter) throws java.io.IOException
- Throws:
java.io.IOException
-
pwd
public java.lang.String pwd() throws java.io.IOException
- Throws:
java.io.IOException
-
ls
public java.util.List<RemoteResourceInfo> ls(java.lang.String path) throws java.io.IOException
- Overrides:
ls
in classSFTPClient
- Throws:
java.io.IOException
-
ls
public java.util.List<RemoteResourceInfo> ls(java.lang.String path, RemoteResourceFilter filter) throws java.io.IOException
- Overrides:
ls
in classSFTPClient
- Throws:
java.io.IOException
-
ls
public java.util.List<RemoteResourceInfo> ls(java.lang.String path, RemoteResourceSelector selector) throws java.io.IOException
- Overrides:
ls
in classSFTPClient
- Throws:
java.io.IOException
-
open
public RemoteFile open(java.lang.String filename, java.util.Set<OpenMode> mode, FileAttributes attrs) throws java.io.IOException
- Overrides:
open
in classSFTPClient
- Throws:
java.io.IOException
-
open
public RemoteFile open(java.lang.String filename, java.util.Set<OpenMode> mode) throws java.io.IOException
- Overrides:
open
in classSFTPClient
- Throws:
java.io.IOException
-
open
public RemoteFile open(java.lang.String filename) throws java.io.IOException
- Overrides:
open
in classSFTPClient
- Throws:
java.io.IOException
-
mkdir
public void mkdir(java.lang.String dirname) throws java.io.IOException
- Overrides:
mkdir
in classSFTPClient
- Throws:
java.io.IOException
-
mkdirs
public void mkdirs(java.lang.String path) throws java.io.IOException
- Overrides:
mkdirs
in classSFTPClient
- Throws:
java.io.IOException
-
statExistence
public FileAttributes statExistence(java.lang.String path) throws java.io.IOException
- Overrides:
statExistence
in classSFTPClient
- Throws:
java.io.IOException
-
rename
public void rename(java.lang.String oldpath, java.lang.String newpath, java.util.Set<RenameFlags> renameFlags) throws java.io.IOException
- Overrides:
rename
in classSFTPClient
- Throws:
java.io.IOException
-
rm
public void rm(java.lang.String filename) throws java.io.IOException
- Overrides:
rm
in classSFTPClient
- Throws:
java.io.IOException
-
rmdir
public void rmdir(java.lang.String dirname) throws java.io.IOException
- Overrides:
rmdir
in classSFTPClient
- Throws:
java.io.IOException
-
symlink
public void symlink(java.lang.String linkpath, java.lang.String targetpath) throws java.io.IOException
- Overrides:
symlink
in classSFTPClient
- Throws:
java.io.IOException
-
setattr
public void setattr(java.lang.String path, FileAttributes attrs) throws java.io.IOException
- Overrides:
setattr
in classSFTPClient
- Throws:
java.io.IOException
-
readlink
public java.lang.String readlink(java.lang.String path) throws java.io.IOException
- Overrides:
readlink
in classSFTPClient
- Throws:
java.io.IOException
-
stat
public FileAttributes stat(java.lang.String path) throws java.io.IOException
- Overrides:
stat
in classSFTPClient
- Throws:
java.io.IOException
-
lstat
public FileAttributes lstat(java.lang.String path) throws java.io.IOException
- Overrides:
lstat
in classSFTPClient
- Throws:
java.io.IOException
-
truncate
public void truncate(java.lang.String path, long size) throws java.io.IOException
- Overrides:
truncate
in classSFTPClient
- Throws:
java.io.IOException
-
canonicalize
public java.lang.String canonicalize(java.lang.String path) throws java.io.IOException
- Overrides:
canonicalize
in classSFTPClient
- Throws:
java.io.IOException
-
get
public void get(java.lang.String source, java.lang.String dest) throws java.io.IOException
- Overrides:
get
in classSFTPClient
- Throws:
java.io.IOException
-
get
public void get(java.lang.String source, LocalDestFile dest) throws java.io.IOException
- Overrides:
get
in classSFTPClient
- Throws:
java.io.IOException
-
put
public void put(java.lang.String source, java.lang.String dest) throws java.io.IOException
- Overrides:
put
in classSFTPClient
- Throws:
java.io.IOException
-
put
public void put(LocalSourceFile source, java.lang.String dest) throws java.io.IOException
- Overrides:
put
in classSFTPClient
- Throws:
java.io.IOException
-
-