Package adams.core.io.fileoperations
Interface FileOperations
-
- All Known Subinterfaces:
RemoteFileOperations
- All Known Implementing Classes:
AbstractFileOperations
,AbstractRemoteFileOperations
,FtpFileOperations
,LocalFileOperations
,RemoteToRemoteFileOperations
,SftpFileOperations
,SmbFileOperations
public interface FileOperations
Interface for file operation facades.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
copy(String source, String target)
Copies a file.String
delete(String file)
Deletes a file.boolean
isSupported(Operation op)
Checks whether the given operation is supported.String
mkdir(String dir)
Creates the directory.String
move(String source, String target)
Moves a file.String
rename(String source, String target)
Renames a file.
-
-
-
Method Detail
-
isSupported
boolean isSupported(Operation op)
Checks whether the given operation is supported.- Parameters:
op
- the operation to check- Returns:
- true if supported
-
copy
String copy(String source, String target)
Copies a file.- Parameters:
source
- the source filetarget
- the target file- Returns:
- null if successful, otherwise error message
-
move
String move(String source, String target)
Moves a file.- Parameters:
source
- the source filetarget
- the target file- Returns:
- null if successful, otherwise error message
-
rename
String rename(String source, String target)
Renames a file.- Parameters:
source
- the source file (old)target
- the target file (new)- Returns:
- null if successful, otherwise error message
-
delete
String delete(String file)
Deletes a file.- Parameters:
file
- the file to delete- Returns:
- null if successful, otherwise error message
-
-