Class RamFileSystem
java.lang.Object
org.apache.commons.vfs2.provider.AbstractVfsComponent
org.apache.commons.vfs2.provider.AbstractFileSystem
org.apache.commons.vfs2.provider.ram.RamFileSystem
- All Implemented Interfaces:
- Closeable,- Serializable,- AutoCloseable,- FileSystem,- VfsComponent
A RAM File System.
- See Also:
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedRamFileSystem(FileName rootName, FileSystemOptions fileSystemOptions) Constructs a new instance.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddCapabilities(Collection<Capability> caps) Adds the capabilities of this file system.voidattach(RamFileObject ramFileObject) Attaches this instance to the given RamFileObject.voidclose()Close the RAMFileSystem.protected FileObjectcreateFile(AbstractFileName name) Creates a file object.voidimportTree(File file) Import a Tree.Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileSystemaddJunction, 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, setAttributeMethods inherited from class org.apache.commons.vfs2.provider.AbstractVfsComponentgetContext, getLogger, setContext, setLogger
- 
Constructor Details- 
RamFileSystemConstructs a new instance.- Parameters:
- rootName- The root file name of this file system.
- fileSystemOptions- Options to build this file system.
 
 
- 
- 
Method Details- 
addCapabilitiesDescription copied from class:AbstractFileSystemAdds the capabilities of this file system.- Specified by:
- addCapabilitiesin class- AbstractFileSystem
- Parameters:
- caps- collections of Capabilities, can be immutable.
 
- 
attachAttaches this instance to the given RamFileObject.- Parameters:
- ramFileObject- A RAM file object.
 
- 
closeClose the RAMFileSystem.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Specified by:
- closein interface- VfsComponent
- Overrides:
- closein class- AbstractFileSystem
 
- 
createFileDescription copied from class:AbstractFileSystemCreates 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.
 
- 
importTreeImport a Tree.- Parameters:
- file- The File
- Throws:
- FileSystemException- if an error occurs.
 
 
-