com.mindbright.net.ftp
public interface FTPServerEventHandler
| Modifier and Type | Method and Description |
|---|---|
void |
abort() |
void |
append(java.lang.String file,
java.io.InputStream data,
boolean binary)
Append to a file on the server.
|
void |
changeDirectory(java.lang.String dir)
Change current directory on the server.
|
void |
chmod(int mod,
java.lang.String file)
Modify the file permissions.
|
void |
delete(java.lang.String file)
Delete the given file.
|
boolean |
isPlainFile(java.lang.String file)
Check if the name refers to a normal file as opposed to for example
a directory.
|
void |
list(java.lang.String path,
java.io.OutputStream data)
Lists the names of the files and directories in the given directory.
|
boolean |
login(java.lang.String user,
java.lang.String pass)
Login to server.
|
void |
mkdir(java.lang.String dir)
Create a new directory.
|
long |
modTime(java.lang.String file)
Find out when a file was last modified.
|
void |
nameList(java.lang.String path,
java.io.OutputStream data)
Lists the contents of the given directory.
|
java.lang.String |
pwd()
Get the current working directory.
|
void |
quit()
Close the ftp session.
|
void |
renameFrom(java.lang.String from)
The first step in a rename operation.
|
void |
renameTo(java.lang.String to)
The second step in the rename operation.
|
void |
retrieve(java.lang.String file,
java.io.OutputStream data,
boolean binary)
Retrieve a file from the server.
|
void |
rmdir(java.lang.String dir)
Remove the given directory.
|
long |
size(java.lang.String file)
Get the size of a file.
|
void |
store(java.lang.String file,
java.io.InputStream data,
boolean binary)
Store a file on the server.
|
java.lang.String |
system()
Get the type of system the server is running.
|
boolean login(java.lang.String user,
java.lang.String pass)
user - Username to login as.pass - Password.void quit()
boolean isPlainFile(java.lang.String file)
file - The name of the file.void changeDirectory(java.lang.String dir)
throws FTPException
dir - Name of new directoryFTPExceptionvoid renameFrom(java.lang.String from)
throws FTPException
renameTo.from - The name of the file to rename.FTPExceptionvoid renameTo(java.lang.String to)
throws FTPException
renameFromto - The new name of the file.FTPExceptionvoid delete(java.lang.String file)
throws FTPException
file - Name of the file to delete.FTPExceptionvoid rmdir(java.lang.String dir)
throws FTPException
dir - Directory to remove.FTPExceptionvoid mkdir(java.lang.String dir)
throws FTPException
dir - Name of directory to create.FTPExceptionvoid chmod(int mod,
java.lang.String file)
throws FTPException
mod - New file permissions.file - Name of file to modify.FTPExceptionjava.lang.String pwd()
java.lang.String system()
long modTime(java.lang.String file)
throws FTPException
file - Name of file to investigate.FTPExceptionlong size(java.lang.String file)
throws FTPException
file - Name of file to get the size of.FTPExceptionvoid store(java.lang.String file,
java.io.InputStream data,
boolean binary)
throws FTPException
file - Name to store file as.data - Stream from which the contents of the file is read.binary - Controls the translating of line endings.FTPExceptionvoid append(java.lang.String file,
java.io.InputStream data,
boolean binary)
throws FTPException
file - File to append to.data - Stream from which the contents of the file is read.binary - Controls the translating of line endings.FTPExceptionvoid retrieve(java.lang.String file,
java.io.OutputStream data,
boolean binary)
throws FTPException
file - Name of file to retrieve.data - Stream to which the file content is written.binary - Controls the translating of line endings.FTPExceptionvoid list(java.lang.String path,
java.io.OutputStream data)
throws FTPException
nameList is
that the latter appends a trailing '/' to directory names.path - Directory to list the contens of.data - Stream to write the results to.FTPExceptionvoid nameList(java.lang.String path,
java.io.OutputStream data)
throws FTPException
list is
that the this appends a trailing '/' to directory names.path - Directory to list the contens of.data - Stream to write the results to.FTPExceptionvoid abort()