public class VirtualFileSystem extends AbstractFileSystem
TODO - Handle nested junctions.
Constructor and Description |
---|
VirtualFileSystem(AbstractFileName rootName,
FileSystemOptions fileSystemOptions) |
Modifier and Type | Method and Description |
---|---|
protected void |
addCapabilities(Collection<Capability> caps)
Adds the capabilities of this file system.
|
void |
addJunction(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.
|
void |
removeJunction(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, setAttribute
getContext, getLogger, setContext, setLogger
public VirtualFileSystem(AbstractFileName rootName, FileSystemOptions fileSystemOptions)
protected void addCapabilities(Collection<Capability> caps)
addCapabilities
in class AbstractFileSystem
caps
- collections of Capabilities, can be immutable.protected FileObject createFile(AbstractFileName name) throws Exception
createFile
in class AbstractFileSystem
name
- name referencing the new file.Exception
- might throw an Exception, which is then wrapped in FileSystemException.public void addJunction(String junctionPoint, FileObject targetFile) throws FileSystemException
addJunction
in interface FileSystem
addJunction
in class AbstractFileSystem
junctionPoint
- The location of the junction.targetFile
- The target file to base the junction on.FileSystemException
- if an error occurs.public void removeJunction(String junctionPoint) throws FileSystemException
removeJunction
in interface FileSystem
removeJunction
in class AbstractFileSystem
junctionPoint
- The junction to remove.FileSystemException
- if an error occurs.public void close()
AbstractFileSystem
close
in interface Closeable
close
in interface AutoCloseable
close
in interface VfsComponent
close
in class AbstractFileSystem
Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.