Class DefaultFileOperations
java.lang.Object
org.apache.commons.vfs2.operations.DefaultFileOperations
- All Implemented Interfaces:
FileOperations
The default implementations for
FileOperations
.- Since:
- 0.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetOperation
(Class<? extends FileOperation> operationClass) Gets the file operation for the given class.Class<? extends FileOperation>[]
Gets all operations associated with this instance.boolean
hasOperation
(Class<? extends FileOperation> operationClass) Tests @return whether an operationoperationClass
is available.
-
Constructor Details
-
DefaultFileOperations
Constructs a new instance.- Parameters:
file
- The file.
-
-
Method Details
-
getOperation
public FileOperation getOperation(Class<? extends FileOperation> operationClass) throws FileSystemException Description copied from interface:FileOperations
Gets the file operation for the given class.- Specified by:
getOperation
in interfaceFileOperations
- Parameters:
operationClass
- The Class that performs the operation.- Returns:
- The FileOperation.
- Throws:
FileSystemException
- if an error occurs.
-
getOperations
Description copied from interface:FileOperations
Gets all operations associated with this instance.- Specified by:
getOperations
in interfaceFileOperations
- Returns:
- The operation classes.
- Throws:
FileSystemException
- If an error occurs.
-
hasOperation
public boolean hasOperation(Class<? extends FileOperation> operationClass) throws FileSystemException Description copied from interface:FileOperations
Tests @return whether an operationoperationClass
is available.- Specified by:
hasOperation
in interfaceFileOperations
- Parameters:
operationClass
- the operation's class.- Returns:
- true if the operation of specified class is supported for current FileObject and false otherwise.
- Throws:
FileSystemException
- if an error occurs.
-