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.booleanhasOperation(Class<? extends FileOperation> operationClass) Tests @return whether an operationoperationClassis 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:FileOperationsGets the file operation for the given class.- Specified by:
getOperationin interfaceFileOperations- Parameters:
operationClass- The Class that performs the operation.- Returns:
- The FileOperation.
- Throws:
FileSystemException- if an error occurs.
-
getOperations
Description copied from interface:FileOperationsGets all operations associated with this instance.- Specified by:
getOperationsin 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:FileOperationsTests @return whether an operationoperationClassis available.- Specified by:
hasOperationin 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.
-