Search in sources :

Example 11 with FileProvider

use of org.apache.commons.vfs2.provider.FileProvider in project commons-vfs by apache.

the class DefaultFileSystemManager method getFileSystemConfigBuilder.

/**
 * Get the configuration builder for the given scheme.
 *
 * @param scheme The scheme to locate.
 * @return The FileSystemConfigBuilder for the scheme.
 * @throws FileSystemException if the given scheme is not konwn
 */
@Override
public FileSystemConfigBuilder getFileSystemConfigBuilder(final String scheme) throws FileSystemException {
    final FileProvider provider = providers.get(scheme);
    FileSystemException.requireNonNull(provider, "vfs.impl/unknown-scheme.error", scheme);
    return provider.getConfigBuilder();
}
Also used : LocalFileProvider(org.apache.commons.vfs2.provider.LocalFileProvider) AbstractFileProvider(org.apache.commons.vfs2.provider.AbstractFileProvider) FileProvider(org.apache.commons.vfs2.provider.FileProvider)

Aggregations

FileProvider (org.apache.commons.vfs2.provider.FileProvider)10 AbstractFileProvider (org.apache.commons.vfs2.provider.AbstractFileProvider)6 LocalFileProvider (org.apache.commons.vfs2.provider.LocalFileProvider)6 FileName (org.apache.commons.vfs2.FileName)2 FileObject (org.apache.commons.vfs2.FileObject)1 FileSystemException (org.apache.commons.vfs2.FileSystemException)1 FileSystemOptions (org.apache.commons.vfs2.FileSystemOptions)1 FileType (org.apache.commons.vfs2.FileType)1 DefaultFileSystemManager (org.apache.commons.vfs2.impl.DefaultFileSystemManager)1 AbstractFileName (org.apache.commons.vfs2.provider.AbstractFileName)1 DefaultLocalFileProvider (org.apache.commons.vfs2.provider.local.DefaultLocalFileProvider)1 Test (org.junit.Test)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1 VfsEmbeddedFileSystemCloser (org.pentaho.di.core.osgi.api.VfsEmbeddedFileSystemCloser)1 GoogleDriveFileProvider (org.pentaho.googledrive.vfs.GoogleDriveFileProvider)1