public interface FtpSupportIntf
Modifier and Type | Method and Description |
---|---|
boolean |
cd(java.lang.String remotePath)
Changes the current working directory.
|
boolean |
delete(java.lang.String fileName)
Remove a file from the remote host.
|
void |
disconnect()
Disconnects from the remote FTP server
|
boolean |
get(java.lang.String localFile,
java.lang.String remoteFile)
Copy the remote file to the local file.
|
java.lang.String |
getHost()
Returns the remote host
|
java.lang.String |
getLogin()
Returns the login name
|
java.lang.String |
getPassword()
Returns the login password
|
java.util.Date |
getTimestamp(java.lang.String remotePath)
Returns the timestamp of the given remote path.
|
java.lang.String[] |
listDirectories(java.lang.String remotePath)
Returns the list of directories in the given remote directory.
|
java.lang.String[] |
listFiles()
Returns the list of files in the current remote directory.
|
java.lang.String[] |
listFiles(java.lang.String remotePath)
Returns the list of files in the given remote directory.
|
boolean |
login(java.lang.String ip,
java.lang.String login,
java.lang.String password)
Logs into the remote host, using the given ip address, login name
and password.
|
boolean |
logout()
Logs out of the remote FTP server
|
boolean |
put(java.lang.String localFile,
java.lang.String remoteFile)
Copy the local file to the remote file.
|
java.lang.String |
pwd()
Returns the present working directory.
|
boolean |
rename(java.lang.String from,
java.lang.String to) |
void |
setAsciiFileType()
Sets the transfer file type to ASCII
|
void |
setBinaryFileType()
Sets the transfer file type to BINARY
|
boolean login(java.lang.String ip, java.lang.String login, java.lang.String password) throws java.io.IOException
ip
- remote ip addresslogin
- login namepassword
- login password
java.io.IOException
boolean logout() throws java.io.IOException
java.io.IOException
void disconnect() throws java.io.IOException
java.io.IOException
void setBinaryFileType()
void setAsciiFileType()
boolean get(java.lang.String localFile, java.lang.String remoteFile) throws java.io.IOException
localFile
- Local file name.remoteFile
- Remote file name.
java.io.IOException
boolean put(java.lang.String localFile, java.lang.String remoteFile) throws java.io.IOException
localFile
- Local file name.remoteFile
- Remote file name.
java.io.IOException
boolean delete(java.lang.String fileName) throws java.io.IOException
fileName
- remote file pathnamejava.io.IOException
java.lang.String pwd() throws java.io.IOException
java.io.IOException
boolean cd(java.lang.String remotePath) throws java.io.IOException
remotePath
- new remote directoryjava.io.IOException
java.lang.String[] listFiles() throws java.io.IOException
java.io.IOException
java.lang.String[] listFiles(java.lang.String remotePath) throws java.io.IOException
remotePath
- remote directory to listjava.io.IOException
java.lang.String[] listDirectories(java.lang.String remotePath) throws java.io.IOException
remotePath
- remote directory to listjava.io.IOException
java.util.Date getTimestamp(java.lang.String remotePath) throws java.io.IOException
remotePath
- remote path for which to get timestampjava.io.IOException
boolean rename(java.lang.String from, java.lang.String to) throws java.io.IOException
java.io.IOException
java.lang.String getPassword()
java.lang.String getHost()
java.lang.String getLogin()