Class AbstractFileProvider

    • Constructor Detail

      • AbstractFileProvider

        public AbstractFileProvider()
    • Method Detail

      • setFileNameParser

        protected void setFileNameParser​(FileNameParser parser)
      • createFileSystem

        public FileObject createFileSystem​(java.lang.String scheme,
                                           FileObject file,
                                           FileSystemOptions properties)
                                    throws FileSystemException
        Creates a layered file system. This method throws a 'not supported' exception.
        Specified by:
        createFileSystem in interface FileProvider
        Parameters:
        scheme - The protocol to use to access the file.
        file - a FileObject.
        properties - Options to the file system.
        Returns:
        A FileObject associated with the new FileSystem.
        Throws:
        FileSystemException - if an error occurs.
      • addFileSystem

        protected void addFileSystem​(java.lang.Comparable<?> key,
                                     FileSystem fs)
                              throws FileSystemException
        Adds a file system to those cached by this provider.

        The file system may implement VfsComponent, in which case it is initialised.

        Parameters:
        key - The root file of the file system, part of the cache key.
        fs - the file system to add.
        Throws:
        FileSystemException - if any error occurs.
      • findFileSystem

        protected FileSystem findFileSystem​(java.lang.Comparable<?> key,
                                            FileSystemOptions fileSystemProps)
        Locates a cached file system.
        Parameters:
        key - The root file of the file system, part of the cache key.
        fileSystemProps - file system options the file system instance must have.
        Returns:
        The file system instance, or null if it is not cached.
      • freeUnusedResources

        public void freeUnusedResources()
        Free unused resources.
      • closeFileSystem

        public void closeFileSystem​(FileSystem filesystem)
        Close the FileSystem.
        Parameters:
        filesystem - The FileSystem to close.