org.apache.commons.vfs.provider
Interface FileProvider

All Known Subinterfaces:
LocalFileProvider
All Known Implementing Classes:
AbstractFileProvider, AbstractLayeredFileProvider, AbstractOriginatingFileProvider, Bzip2FileProvider, CompositeFileProvider, CompressedFileFileProvider, DefaultLocalFileProvider, FtpFileProvider, GzipFileProvider, HttpFileProvider, HttpsFileProvider, JarFileProvider, MimeFileProvider, RamFileProvider, ResourceFileProvider, SftpFileProvider, SmbFileProvider, TarFileProvider, Tbz2FileProvider, TemporaryFileProvider, TgzFileProvider, UrlFileProvider, WebdavFileProvider, ZipFileProvider

public interface FileProvider

A file provider. Each file provider is responsible for handling files for a particular URI scheme.

A file provider may also implement VfsComponent.

Version:
$Revision: 804548 $ $Date: 2009-08-16 04:12:32 +0200 (So, 16. Aug 2009) $
Author:
Adam Murdoch

Method Summary
 FileObject createFileSystem(java.lang.String scheme, FileObject file, FileSystemOptions fileSystemOptions)
          Creates a layered file system.
 FileObject findFile(FileObject baseFile, java.lang.String uri, FileSystemOptions fileSystemOptions)
          Locates a file object, by absolute URI.
 java.util.Collection getCapabilities()
          Get the filesystem capabilities.
These are the same as on the filesystem, but available before the first filesystem was instanciated.
 FileSystemConfigBuilder getConfigBuilder()
          Gets the configbuilder useable to collect the needed fileSystemOptions.
 FileName parseUri(FileName root, java.lang.String uri)
          Parse the URI into a FileName.
 

Method Detail

findFile

FileObject findFile(FileObject baseFile,
                    java.lang.String uri,
                    FileSystemOptions fileSystemOptions)
                    throws FileSystemException
Locates a file object, by absolute URI.

Parameters:
baseFile - The base file to use for resolving the individual parts of a compound URI.
uri - The absolute URI of the file to find.
fileSystemOptions - The FileSystemOptions
Returns:
The FileObject.
Throws:
FileSystemException - if an error occurs locating the file.

createFileSystem

FileObject createFileSystem(java.lang.String scheme,
                            FileObject file,
                            FileSystemOptions fileSystemOptions)
                            throws FileSystemException
Creates a layered file system.

Parameters:
scheme - The URI scheme for the layered file system.
file - The file to build the file system on.
fileSystemOptions - The FileSystemOptions.
Returns:
A FileObject in the file system.
Throws:
FileSystemException - if an error occurs.

getConfigBuilder

FileSystemConfigBuilder getConfigBuilder()
Gets the configbuilder useable to collect the needed fileSystemOptions.

Returns:
a FileSystemConfigBuilder for the particular file system.

getCapabilities

java.util.Collection getCapabilities()
Get the filesystem capabilities.
These are the same as on the filesystem, but available before the first filesystem was instanciated.

Returns:
a Collection of the file systems Capabilities.

parseUri

FileName parseUri(FileName root,
                  java.lang.String uri)
                  throws FileSystemException
Parse the URI into a FileName.

Parameters:
root - The base FileName.
uri - The file to be accessed.
Returns:
A FileName representing the target file.
Throws:
FileSystemException - if an error occurs.


Copyright © 2002-2009 Apache Software Foundation. All Rights Reserved.