Package me.saro.commons.ftp
Class SFTP
- java.lang.Object
-
- me.saro.commons.ftp.SFTP
-
-
Constructor Summary
Constructors Constructor Description SFTP(java.lang.String host, int port, java.lang.String user, java.lang.String pass)
-
Method Summary
Modifier and Type Method Description voidclose()closebooleandelete(java.lang.String filename)remove filebooleanhasDirectory(java.lang.String directoryname)has directory in pathbooleanhasFile(java.lang.String filename)has file in pathjava.util.List<java.lang.String>listDirectories()get directory list in now pathjava.util.List<java.lang.String>listDirectories(java.util.function.Predicate<java.lang.String> filter)get directory list in now pathjava.util.List<java.lang.String>listFiles()get file list in now pathjava.util.List<java.lang.String>listFiles(java.util.function.Predicate<java.lang.String> filter)get file list in now pathbooleanmkdir(java.lang.String createDirectoryName)make new directoryjava.lang.Stringpath()get now path
same method path(), pwd()booleanpath(java.lang.String pathname)move path
same method path(), cd()booleanrecv(java.lang.String remoteFilename, java.io.File localFile)recv filebooleansend(java.lang.String saveFilename, java.io.File localFile)send file
-
-
-
Method Detail
-
path
public boolean path(java.lang.String pathname) throws java.io.IOExceptionDescription copied from interface:FTPmove path
same method path(), cd()
-
path
public java.lang.String path() throws java.io.IOExceptionDescription copied from interface:FTPget now path
same method path(), pwd()
-
listFiles
public java.util.List<java.lang.String> listFiles(java.util.function.Predicate<java.lang.String> filter) throws java.io.IOExceptionDescription copied from interface:FTPget file list in now path
-
listFiles
public java.util.List<java.lang.String> listFiles() throws java.io.IOExceptionDescription copied from interface:FTPget file list in now path
-
listDirectories
public java.util.List<java.lang.String> listDirectories(java.util.function.Predicate<java.lang.String> filter) throws java.io.IOExceptionDescription copied from interface:FTPget directory list in now path- Specified by:
listDirectoriesin interfaceFTP- Parameters:
filter- file name filter- Returns:
- Throws:
java.io.IOException
-
listDirectories
public java.util.List<java.lang.String> listDirectories() throws java.io.IOExceptionDescription copied from interface:FTPget directory list in now path- Specified by:
listDirectoriesin interfaceFTP- Returns:
- Throws:
java.io.IOException
-
hasFile
public boolean hasFile(java.lang.String filename) throws java.io.IOExceptionDescription copied from interface:FTPhas file in path
-
hasDirectory
public boolean hasDirectory(java.lang.String directoryname) throws java.io.IOExceptionDescription copied from interface:FTPhas directory in path- Specified by:
hasDirectoryin interfaceFTP- Returns:
- Throws:
java.io.IOException
-
delete
public boolean delete(java.lang.String filename) throws java.io.IOExceptionDescription copied from interface:FTPremove file
-
send
public boolean send(java.lang.String saveFilename, java.io.File localFile) throws java.io.IOExceptionDescription copied from interface:FTPsend file
-
recv
public boolean recv(java.lang.String remoteFilename, java.io.File localFile) throws java.io.IOExceptionDescription copied from interface:FTPrecv file
-
mkdir
public boolean mkdir(java.lang.String createDirectoryName) throws java.io.IOExceptionDescription copied from interface:FTPmake new directory
-
-