Class DefaultVfsComponentContext
java.lang.Object
org.apache.commons.vfs2.impl.DefaultVfsComponentContext
- All Implemented Interfaces:
VfsComponentContext
The default context implementation.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the file system manager for the current contextLocates a file replicator for the provider to use.Locates a temporary file store for the provider to use.Parses a URI into a FileName.resolveFile(String name, FileSystemOptions fileSystemOptions) Locate a file by name.resolveFile(FileObject baseFile, String name, FileSystemOptions fileSystemOptions) Locate a file by name.toFileObject(File file) Returns aFileObjectfor a local file.
-
Field Details
-
manager
-
-
Constructor Details
-
DefaultVfsComponentContext
-
-
Method Details
-
resolveFile
public FileObject resolveFile(FileObject baseFile, String name, FileSystemOptions fileSystemOptions) throws FileSystemException Locate a file by name.- Specified by:
resolveFilein interfaceVfsComponentContext- Parameters:
baseFile- The base FileObject.name- The name of the file to locate.fileSystemOptions- The FileSystemOptions.- Returns:
- The FileObject for the located file.
- Throws:
FileSystemException- if an error occurs.
-
resolveFile
public FileObject resolveFile(String name, FileSystemOptions fileSystemOptions) throws FileSystemException Locate a file by name.- Specified by:
resolveFilein interfaceVfsComponentContext- Parameters:
name- The name of the file to locate.fileSystemOptions- The FileSystemOptions.- Returns:
- The FileObject for the located file.
- Throws:
FileSystemException- if an error occurs.
-
parseURI
Description copied from interface:VfsComponentContextParses a URI into a FileName.- Specified by:
parseURIin interfaceVfsComponentContext- Parameters:
uri- The URI String.- Returns:
- The FileName.
- Throws:
FileSystemException- if an error occurs.
-
toFileObject
Returns aFileObjectfor a local file.- Specified by:
toFileObjectin interfaceVfsComponentContext- Parameters:
file- The File to convert to a FileObject.- Returns:
- the FileObject.
- Throws:
FileSystemException- if an error occurs.
-
getReplicator
Locates a file replicator for the provider to use.- Specified by:
getReplicatorin interfaceVfsComponentContext- Returns:
- The FileReplicator.
- Throws:
FileSystemException- if an error occurs.
-
getTemporaryFileStore
Locates a temporary file store for the provider to use.- Specified by:
getTemporaryFileStorein interfaceVfsComponentContext- Returns:
- The TemporaryFileStore.
- Throws:
FileSystemException- if an error occurs.
-
getFileSystemManager
Returns the file system manager for the current context- Specified by:
getFileSystemManagerin interfaceVfsComponentContext- Returns:
- the file system manager
-