Package adams.core.io.fileoperations
Class RemoteToRemoteFileOperations
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.io.fileoperations.AbstractFileOperations
-
- adams.core.io.fileoperations.RemoteToRemoteFileOperations
-
- All Implemented Interfaces:
FileOperations
,LoggingLevelHandler
,LoggingSupporter
,SizeOfHandler
,Serializable
public class RemoteToRemoteFileOperations extends AbstractFileOperations
File operations between two remote locations, using intermediate local files.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected RemoteFileOperations
m_Source
the source file operations.protected RemoteFileOperations
m_Target
the target file operations.-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description RemoteToRemoteFileOperations()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
copy(String source, String target)
Copies a file.String
delete(String file)
Deletes a file.RemoteFileOperations
getSource()
Returns the source file operations.RemoteFileOperations
getTarget()
Returns the target file operations.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.void
setSource(RemoteFileOperations value)
Sets the source file operations.void
setTarget(RemoteFileOperations value)
Sets the target file operations.-
Methods inherited from class adams.core.io.fileoperations.AbstractFileOperations
initialize
-
Methods inherited from class adams.core.logging.CustomLoggingLevelObject
setLoggingLevel
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Source
protected RemoteFileOperations m_Source
the source file operations.
-
m_Target
protected RemoteFileOperations m_Target
the target file operations.
-
-
Method Detail
-
setSource
public void setSource(RemoteFileOperations value)
Sets the source file operations.- Parameters:
value
- the source
-
getSource
public RemoteFileOperations getSource()
Returns the source file operations.- Returns:
- the source
-
setTarget
public void setTarget(RemoteFileOperations value)
Sets the target file operations.- Parameters:
value
- the target
-
getTarget
public RemoteFileOperations getTarget()
Returns the target file operations.- Returns:
- the target
-
isSupported
public boolean isSupported(Operation op)
Checks whether the given operation is supported.- Parameters:
op
- the operation to check- Returns:
- true if supported
-
copy
public 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
public 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
public String rename(String source, String target)
Renames a file. UsesgetSource()
.- Parameters:
source
- the source file (old)target
- the target file (new)- Returns:
- null if successful, otherwise error message
-
delete
public String delete(String file)
Deletes a file. UsesgetSource()
.- Parameters:
file
- the file to delete- Returns:
- null if successful, otherwise error message
-
-