net.schmizz.sshj.sftp
Class SFTPClient
java.lang.Object
net.schmizz.sshj.sftp.SFTPClient
- All Implemented Interfaces:
- Closeable
- Direct Known Subclasses:
- StatefulSFTPClient
public class SFTPClient
- extends Object
- implements Closeable
Method Summary |
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)
|
RemoteFile |
open(String filename,
Set<OpenMode> mode)
|
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()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected final org.slf4j.Logger log
- Logger
engine
protected final SFTPEngine engine
xfer
protected final SFTPFileTransfer xfer
SFTPClient
public SFTPClient(SFTPEngine engine)
getSFTPEngine
public SFTPEngine getSFTPEngine()
getFileTransfer
public SFTPFileTransfer getFileTransfer()
ls
public List<RemoteResourceInfo> ls(String path)
throws IOException
- Throws:
IOException
ls
public List<RemoteResourceInfo> ls(String path,
RemoteResourceFilter filter)
throws IOException
- Throws:
IOException
open
public RemoteFile open(String filename,
Set<OpenMode> mode,
FileAttributes attrs)
throws IOException
- Throws:
IOException
open
public RemoteFile open(String filename,
Set<OpenMode> mode)
throws IOException
- Throws:
IOException
open
public RemoteFile open(String filename)
throws IOException
- Throws:
IOException
mkdir
public void mkdir(String dirname)
throws IOException
- Throws:
IOException
mkdirs
public void mkdirs(String path)
throws IOException
- Throws:
IOException
statExistence
public FileAttributes statExistence(String path)
throws IOException
- Throws:
IOException
rename
public void rename(String oldpath,
String newpath)
throws IOException
- Throws:
IOException
rm
public void rm(String filename)
throws IOException
- Throws:
IOException
rmdir
public void rmdir(String dirname)
throws IOException
- Throws:
IOException
symlink
public void symlink(String linkpath,
String targetpath)
throws IOException
- Throws:
IOException
version
public int version()
setattr
public void setattr(String path,
FileAttributes attrs)
throws IOException
- Throws:
IOException
uid
public int uid(String path)
throws IOException
- Throws:
IOException
gid
public int gid(String path)
throws IOException
- Throws:
IOException
atime
public long atime(String path)
throws IOException
- Throws:
IOException
mtime
public long mtime(String path)
throws IOException
- Throws:
IOException
perms
public Set<FilePermission> perms(String path)
throws IOException
- Throws:
IOException
mode
public FileMode mode(String path)
throws IOException
- Throws:
IOException
type
public FileMode.Type type(String path)
throws IOException
- Throws:
IOException
readlink
public String readlink(String path)
throws IOException
- Throws:
IOException
stat
public FileAttributes stat(String path)
throws IOException
- Throws:
IOException
lstat
public FileAttributes lstat(String path)
throws IOException
- Throws:
IOException
chown
public void chown(String path,
int uid)
throws IOException
- Throws:
IOException
chmod
public void chmod(String path,
int perms)
throws IOException
- Throws:
IOException
chgrp
public void chgrp(String path,
int gid)
throws IOException
- Throws:
IOException
truncate
public void truncate(String path,
long size)
throws IOException
- Throws:
IOException
canonicalize
public String canonicalize(String path)
throws IOException
- Throws:
IOException
size
public long size(String path)
throws IOException
- Throws:
IOException
get
public void get(String source,
String dest)
throws IOException
- Throws:
IOException
put
public void put(String source,
String dest)
throws IOException
- Throws:
IOException
get
public void get(String source,
LocalDestFile dest)
throws IOException
- Throws:
IOException
put
public void put(LocalSourceFile source,
String dest)
throws IOException
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Throws:
IOException
Copyright © 2009-2012. All Rights Reserved.