Package org.apache.commons.vfs2.impl
Class VirtualFileSystem
java.lang.Object
org.apache.commons.vfs2.provider.AbstractVfsComponent
org.apache.commons.vfs2.provider.AbstractFileSystem
org.apache.commons.vfs2.impl.VirtualFileSystem
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- FileSystem,- VfsComponent
A logical file system, made up of set of junctions, or links, to files from other file systems.
 
TODO - Handle nested junctions.
- 
Constructor SummaryConstructorsConstructorDescriptionVirtualFileSystem(AbstractFileName rootFileName, FileSystemOptions fileSystemOptions) Constructs a new instance.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddCapabilities(Collection<Capability> caps) Adds the capabilities of this file system.voidaddJunction(String junctionPoint, FileObject targetFile) Adds a junction to this file system.voidclose()Closes this component.protected FileObjectcreateFile(AbstractFileName name) Creates a file object.voidremoveJunction(String junctionPoint) Removes a junction from this file system.Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileSystemaddListener, closeCommunicationLink, decorateFileObject, doCloseCommunicationLink, doReplicateFile, fireFileChanged, fireFileCreated, fireFileDeleted, getAttribute, getFileFromCache, getFileSystemManager, getFileSystemOptions, getLastModTimeAccuracy, getParentLayer, getRoot, getRootName, getRootURI, hasCapability, init, isOpen, isReleaseable, notifyAllStreamsClosed, putFileToCache, removeFileFromCache, removeListener, replicateFile, resolveFile, resolveFile, setAttributeMethods inherited from class org.apache.commons.vfs2.provider.AbstractVfsComponentgetContext, getLogger, setContext, setLogger
- 
Constructor Details- 
VirtualFileSystemConstructs a new instance.- Parameters:
- rootFileName- The root file name of this file system.
- fileSystemOptions- Options to build this file system.
 
 
- 
- 
Method Details- 
addCapabilitiesAdds the capabilities of this file system.- Specified by:
- addCapabilitiesin class- AbstractFileSystem
- Parameters:
- caps- collections of Capabilities, can be immutable.
 
- 
addJunctionAdds a junction to this file system.- Specified by:
- addJunctionin interface- FileSystem
- Overrides:
- addJunctionin class- AbstractFileSystem
- Parameters:
- junctionPoint- The location of the junction.
- targetFile- The target file to base the junction on.
- Throws:
- FileSystemException- if an error occurs.
 
- 
closeDescription copied from class:AbstractFileSystemCloses this component.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Specified by:
- closein interface- VfsComponent
- Overrides:
- closein class- AbstractFileSystem
 
- 
createFileCreates a file object. This method is called only if the requested file is not cached.- Specified by:
- createFilein class- AbstractFileSystem
- Parameters:
- name- name referencing the new file.
- Returns:
- new created FileObject.
- Throws:
- Exception- might throw an Exception, which is then wrapped in FileSystemException.
 
- 
removeJunctionRemoves a junction from this file system.- Specified by:
- removeJunctionin interface- FileSystem
- Overrides:
- removeJunctionin class- AbstractFileSystem
- Parameters:
- junctionPoint- The junction to remove.
- Throws:
- FileSystemException- if an error occurs.
 
 
-