Package org.apache.commons.vfs2.impl
Class VirtualFileProvider
java.lang.Object
org.apache.commons.vfs2.provider.AbstractVfsComponent
org.apache.commons.vfs2.provider.AbstractVfsContainer
org.apache.commons.vfs2.impl.VirtualFileProvider
- All Implemented Interfaces:
Closeable
,AutoCloseable
,VfsComponent
A virtual file system provider.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
closeFileSystem
(FileSystem fileSystem) Close a VirtualFileSystem by removing it from the#components
list of this provider.createFileSystem
(String rootUri) Creates an empty virtual file system.createFileSystem
(FileObject rootFile) Creates a virtual file system, with the supplied file as its root.Methods inherited from class org.apache.commons.vfs2.provider.AbstractVfsContainer
addComponent, close, removeComponent
Methods inherited from class org.apache.commons.vfs2.provider.AbstractVfsComponent
getContext, getLogger, init, setContext, setLogger
-
Constructor Details
-
VirtualFileProvider
public VirtualFileProvider()
-
-
Method Details
-
createFileSystem
Creates a virtual file system, with the supplied file as its root.- Parameters:
rootFile
- The root of the file system.- Returns:
- A FileObject in the FileSystem.
- Throws:
FileSystemException
- if an error occurs.
-
createFileSystem
Creates an empty virtual file system.- Parameters:
rootUri
- The root of the file system.- Returns:
- A FileObject in the FileSystem.
- Throws:
FileSystemException
- if an error occurs.
-
closeFileSystem
Close a VirtualFileSystem by removing it from the#components
list of this provider.This gets called from DefaultFileManager#_closeFileSystem.
- Parameters:
fileSystem
- the file system remembered by this provider.
-