Class VirtualFileSystem

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, FileSystem, VfsComponent

    public class VirtualFileSystem
    extends AbstractFileSystem
    A logical file system, made up of set of junctions, or links, to files from other file systems.

    TODO - Handle nested junctions.

    • Method Detail

      • addCapabilities

        protected void addCapabilities​(java.util.Collection<Capability> caps)
        Adds the capabilities of this file system.
        Specified by:
        addCapabilities in class AbstractFileSystem
        Parameters:
        caps - collections of Capabilities, can be immutable.
      • createFile

        protected FileObject createFile​(AbstractFileName name)
                                 throws java.lang.Exception
        Creates a file object. This method is called only if the requested file is not cached.
        Specified by:
        createFile in class AbstractFileSystem
        Parameters:
        name - name referencing the new file.
        Returns:
        new created FileObject.
        Throws:
        java.lang.Exception - might throw an Exception, which is then wrapped in FileSystemException.
      • getJunctionForFile

        private FileName getJunctionForFile​(FileName name)
        Locates the junction point for the junction containing the given file.
        Parameters:
        name - The FileName.
        Returns:
        the FileName where the junction occurs.
      • close

        public void close()
        Description copied from class: AbstractFileSystem
        Closes this component.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface VfsComponent
        Overrides:
        close in class AbstractFileSystem