public class FTPClient extends Object
| Constructor and Description |
|---|
FTPClient() |
| Modifier and Type | Method and Description |
|---|---|
void |
createDirectory(String directoryName,
String description,
String absPath)
This method creates a new remote directory in the current working one.
|
void |
delete(String absPath)
This method deletes a remote directory.
|
String |
getRootPath()
This method asks and returns the current working directory.
|
FTPFile[] |
list(String absPath)
This method lists the entries of the current working directory
|
void |
test()
Run tests
|
void |
upload(byte[] bFile,
String name,
String description,
String absPath)
This method uploads a byte[] to the remote server
|
void |
upload(byte[] bFile,
String name,
String description,
String absPath,
String mimetype,
long size)
This method uploads a byte[] to the remote server with mimetype and size
|
void |
upload(File file,
String absPath)
This method uploads a file to the remote server
|
void |
upload(File file,
String name,
String description,
String absPath)
This method uploads a file to the remote server
|
public String getRootPath() throws Exception
Exception - If the operation fails.public void delete(String absPath) throws Exception
path - The path to the directory.Exception - If the operation fails.public FTPFile[] list(String absPath) throws Exception
Exception - If the operation fails.public void createDirectory(String directoryName, String description, String absPath) throws Exception
directoryName - The name of the new directory.description - A description for the new directory.Exception - If the operation fails.public void upload(File file, String name, String description, String absPath) throws Exception
file - The file to upload.name - A name for the file.description - A description for the file.Exception - If the operation fails.public void upload(File file, String absPath) throws Exception
file - The file to upload.Exception - If the operation fails.public void upload(byte[] bFile,
String name,
String description,
String absPath)
throws Exception
bFile - in byte[]name - The name of the new filedescription - The description of the new fileabsPath - absolute path where the file will be uploadedException - If the operation fails.public void upload(byte[] bFile,
String name,
String description,
String absPath,
String mimetype,
long size)
throws Exception
bFile - in byte[]name - The name of the new filedescription - The description of the new fileabsPath - absolute path where the file will be uploadedmimetype - The mimetype of the filesize - The size of the fileException - If the operation fails.Copyright © 2016. All Rights Reserved.