Class VirtualFileProvider

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

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

      • VirtualFileProvider

        public VirtualFileProvider()
    • Method Detail

      • 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​(java.lang.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.