public class VirtualFileSystem extends AbstractFileSystem
TODO - Handle nested junctions.
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<FileName,FileObject> |
junctions |
| Constructor and Description |
|---|
VirtualFileSystem(AbstractFileName rootName,
FileSystemOptions fileSystemOptions) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCapabilities(java.util.Collection<Capability> caps)
Adds the capabilities of this file system.
|
void |
addJunction(java.lang.String junctionPoint,
FileObject targetFile)
Adds a junction to this file system.
|
void |
close()
Closes this component.
|
protected FileObject |
createFile(AbstractFileName name)
Creates a file object.
|
private FileName |
getJunctionForFile(FileName name)
Locates the junction point for the junction containing the given file.
|
void |
removeJunction(java.lang.String junctionPoint)
Removes a junction from this file system.
|
addListener, 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, setAttributegetContext, getLogger, setContext, setLoggerprivate final java.util.Map<FileName,FileObject> junctions
public VirtualFileSystem(AbstractFileName rootName, FileSystemOptions fileSystemOptions)
protected void addCapabilities(java.util.Collection<Capability> caps)
addCapabilities in class AbstractFileSystemcaps - collections of Capabilities, can be immutable.protected FileObject createFile(AbstractFileName name) throws java.lang.Exception
createFile in class AbstractFileSystemname - name referencing the new file.java.lang.Exception - might throw an Exception, which is then wrapped in FileSystemException.public void addJunction(java.lang.String junctionPoint,
FileObject targetFile)
throws FileSystemException
addJunction in interface FileSystemaddJunction in class AbstractFileSystemjunctionPoint - The location of the junction.targetFile - The target file to base the junction on.FileSystemException - if an error occurs.public void removeJunction(java.lang.String junctionPoint)
throws FileSystemException
removeJunction in interface FileSystemremoveJunction in class AbstractFileSystemjunctionPoint - The junction to remove.FileSystemException - if an error occurs.private FileName getJunctionForFile(FileName name)
name - The FileName.public void close()
AbstractFileSystemclose in interface VfsComponentclose in class AbstractFileSystem