|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GenericFileOperations<T>
Method Summary | |
---|---|
boolean |
buildDirectory(String directory,
boolean absolute)
Builds the directory structure. |
void |
changeCurrentDirectory(String path)
Change the current remote directory |
boolean |
deleteFile(String name)
Deletes the file name by name, relative to the current directory |
boolean |
existsFile(String name)
Determines whether the files exists or not |
String |
getCurrentDirectory()
Gets the current remote directory |
List<T> |
listFiles()
List the files in the current directory |
List<T> |
listFiles(String path)
List the files in the given remote directory |
boolean |
renameFile(String from,
String to)
Renames the file |
boolean |
retrieveFile(String name,
Exchange exchange)
Retrieves the file |
void |
setEndpoint(GenericFileEndpoint<T> endpoint)
Sets the endpoint as some implementations need access to the endpoint and how its configured. |
boolean |
storeFile(String name,
Exchange exchange)
Stores the content as a new remote file (upload) |
Method Detail |
---|
void setEndpoint(GenericFileEndpoint<T> endpoint)
endpoint
- the endpointboolean deleteFile(String name) throws GenericFileOperationFailedException
name
- name of the file
GenericFileOperationFailedException
- can be thrownboolean existsFile(String name) throws GenericFileOperationFailedException
name
- name of the file
GenericFileOperationFailedException
- can be thrownboolean renameFile(String from, String to) throws GenericFileOperationFailedException
from
- original nameto
- the new name
GenericFileOperationFailedException
- can be thrownboolean buildDirectory(String directory, boolean absolute) throws GenericFileOperationFailedException
directory
- the directory path to build as a relative string nameabsolute
- wether the directory is an absolute or relative path
GenericFileOperationFailedException
- can be thrownboolean retrieveFile(String name, Exchange exchange) throws GenericFileOperationFailedException
name
- name of the fileexchange
- stream to write the content of the file into
GenericFileOperationFailedException
- can be thrownboolean storeFile(String name, Exchange exchange) throws GenericFileOperationFailedException
name
- name of new fileexchange
- with the content content of the file
GenericFileOperationFailedException
- can be thrownString getCurrentDirectory() throws GenericFileOperationFailedException
GenericFileOperationFailedException
- can be thrownvoid changeCurrentDirectory(String path) throws GenericFileOperationFailedException
path
- the path to change to
GenericFileOperationFailedException
- can be thrownList<T> listFiles() throws GenericFileOperationFailedException
GenericFileOperationFailedException
- can be thrownList<T> listFiles(String path) throws GenericFileOperationFailedException
path
- the remote directory
GenericFileOperationFailedException
- can be thrown
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |