Class VirtualFileProvider

All Implemented Interfaces:
Closeable, AutoCloseable, VfsComponent

public class VirtualFileProvider extends AbstractVfsContainer
A virtual file system provider.
  • Constructor Details

    • VirtualFileProvider

      public VirtualFileProvider()
  • Method Details

    • createFileSystem

      public FileObject createFileSystem(FileObject rootFile) throws FileSystemException
      Creates a virtual file system, with the supplied file as its root.
      Parameters:
      rootFile - The root of the file system.
      Returns:
      A FileObject in the FileSystem.
      Throws:
      FileSystemException - if an error occurs.
    • createFileSystem

      public FileObject createFileSystem(String rootUri) throws FileSystemException
      Creates an empty virtual file system.
      Parameters:
      rootUri - The root of the file system.
      Returns:
      A FileObject in the FileSystem.
      Throws:
      FileSystemException - if an error occurs.
    • closeFileSystem

      void closeFileSystem(FileSystem fileSystem)
      Close a VirtualFileSystem by removing it from the #components list of this provider.

      This gets called from DefaultFileManager#_closeFileSystem.

      Parameters:
      fileSystem - the file system remembered by this provider.