public class RamFileSystem extends AbstractFileSystem implements Serializable
Modifier | Constructor and Description |
---|---|
protected |
RamFileSystem(FileName rootName,
FileSystemOptions fileSystemOptions)
Constructs a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addCapabilities(Collection<Capability> caps)
Adds the capabilities of this file system.
|
void |
attach(RamFileObject ramFileObject)
Attaches this instance to the given RamFileObject.
|
void |
close()
Close the RAMFileSystem.
|
protected FileObject |
createFile(AbstractFileName name)
Creates a file object.
|
void |
importTree(File file)
Import a Tree.
|
addJunction, addListener, closeCommunicationLink, decorateFileObject, doCloseCommunicationLink, doReplicateFile, fireFileChanged, fireFileCreated, fireFileDeleted, getAttribute, getFileFromCache, getFileSystemManager, getFileSystemOptions, getLastModTimeAccuracy, getParentLayer, getRoot, getRootName, getRootURI, hasCapability, init, isOpen, isReleaseable, notifyAllStreamsClosed, putFileToCache, removeFileFromCache, removeJunction, removeListener, replicateFile, resolveFile, resolveFile, setAttribute
getContext, getLogger, setContext, setLogger
protected RamFileSystem(FileName rootName, FileSystemOptions fileSystemOptions)
rootName
- The root file name of this file system.fileSystemOptions
- Options to build this file system.protected void addCapabilities(Collection<Capability> caps)
AbstractFileSystem
addCapabilities
in class AbstractFileSystem
caps
- collections of Capabilities, can be immutable.public void attach(RamFileObject ramFileObject)
ramFileObject
- A RAM file object.public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in interface VfsComponent
close
in class AbstractFileSystem
protected FileObject createFile(AbstractFileName name) throws Exception
AbstractFileSystem
This method is called only if the requested file is not cached.
createFile
in class AbstractFileSystem
name
- name referencing the new file.Exception
- might throw an Exception, which is then wrapped in FileSystemException.public void importTree(File file) throws FileSystemException
file
- The FileFileSystemException
- if an error occurs.Copyright © 2002–2025 The Apache Software Foundation. All rights reserved.