|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.component.file.FileOperations
public class FileOperations
File operations for File.
| Constructor Summary | |
|---|---|
FileOperations()
|
|
FileOperations(FileEndpoint endpoint)
|
|
| 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 |
String |
getCurrentDirectory()
Gets the current remote directory |
List<File> |
listFiles()
List the files in the current directory |
List<File> |
listFiles(String path)
List the files in the given remote directory |
boolean |
renameFile(String from,
String to)
Renames the file |
boolean |
retrieveFile(String name,
GenericFileExchange<File> exchange)
Retrieves the file |
void |
setEndpoint(GenericFileEndpoint endpoint)
Sets the endpoint as some implementations need access to the endpoint and how its configured. |
boolean |
storeFile(String fileName,
GenericFileExchange<File> exchange)
Stores the content as a new remote file (upload) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileOperations()
public FileOperations(FileEndpoint endpoint)
| Method Detail |
|---|
public void setEndpoint(GenericFileEndpoint endpoint)
GenericFileOperations
setEndpoint in interface GenericFileOperations<File>endpoint - the endpoint
public boolean deleteFile(String name)
throws GenericFileOperationFailedException
GenericFileOperations
deleteFile in interface GenericFileOperations<File>name - name of the file
GenericFileOperationFailedException - can be thrown
public boolean renameFile(String from,
String to)
throws GenericFileOperationFailedException
GenericFileOperations
renameFile in interface GenericFileOperations<File>from - original nameto - the new name
GenericFileOperationFailedException - can be thrown
public boolean buildDirectory(String directory,
boolean absolute)
throws GenericFileOperationFailedException
GenericFileOperations
buildDirectory in interface GenericFileOperations<File>directory - the directory path to build as a relative string nameabsolute - wether the directory is an absolute or relative path
GenericFileOperationFailedException - can be thrown
public List<File> listFiles()
throws GenericFileOperationFailedException
GenericFileOperations
listFiles in interface GenericFileOperations<File>GenericFileOperationFailedException - can be thrown
public List<File> listFiles(String path)
throws GenericFileOperationFailedException
GenericFileOperations
listFiles in interface GenericFileOperations<File>path - the remote directory
GenericFileOperationFailedException - can be thrown
public void changeCurrentDirectory(String path)
throws GenericFileOperationFailedException
GenericFileOperations
changeCurrentDirectory in interface GenericFileOperations<File>path - the path to change to
GenericFileOperationFailedException - can be thrown
public String getCurrentDirectory()
throws GenericFileOperationFailedException
GenericFileOperations
getCurrentDirectory in interface GenericFileOperations<File>GenericFileOperationFailedException - can be thrown
public boolean retrieveFile(String name,
GenericFileExchange<File> exchange)
throws GenericFileOperationFailedException
GenericFileOperations
retrieveFile in interface GenericFileOperations<File>name - name of the fileexchange - stream to write the content of the file into
GenericFileOperationFailedException - can be thrown
public boolean storeFile(String fileName,
GenericFileExchange<File> exchange)
throws GenericFileOperationFailedException
GenericFileOperations
storeFile in interface GenericFileOperations<File>fileName - name of new fileexchange - with the content content of the file
GenericFileOperationFailedException - can be thrown
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||