本文整理汇总了Java中org.apache.commons.vfs2.FileName.ROOT_PATH属性的典型用法代码示例。如果您正苦于以下问题:Java FileName.ROOT_PATH属性的具体用法?Java FileName.ROOT_PATH怎么用?Java FileName.ROOT_PATH使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.commons.vfs2.FileName
的用法示例。
在下文中一共展示了FileName.ROOT_PATH属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doCreateFileSystem
/**
* Creates the filesystem.
*/
@Override
protected FileSystem doCreateFileSystem(String scheme, final FileObject file, final FileSystemOptions fileSystemOptions)
throws FileSystemException
{
final FileName name =
new LayeredFileName(scheme, file.getName(), FileName.ROOT_PATH, FileType.FOLDER);
return new MimeFileSystem(name, file, fileSystemOptions);
}
示例2: doCreateFileSystem
/**
* Creates a layered file system. This method is called if the file system
* is not cached.
*
* @param scheme The URI scheme.
* @param file The file to create the file system on top of.
* @return The file system.
*/
@Override
protected FileSystem doCreateFileSystem(final String scheme,
final FileObject file,
final FileSystemOptions fileSystemOptions)
throws FileSystemException
{
final AbstractFileName rootName =
new LayeredFileName(scheme, file.getName(), FileName.ROOT_PATH, FileType.FOLDER);
return new ZipFileSystem(rootName, file, fileSystemOptions);
}
示例3: doCreateFileSystem
/**
* Creates a layered file system. This method is called if the file system
* is not cached.
*
* @param scheme The URI scheme.
* @param file The file to create the file system on top of.
* @return The file system.
*/
@Override
protected FileSystem doCreateFileSystem(final String scheme,
final FileObject file,
final FileSystemOptions fileSystemOptions)
throws FileSystemException
{
final AbstractFileName name =
new LayeredFileName(scheme, file.getName(), FileName.ROOT_PATH, FileType.FOLDER);
return new JarFileSystem(name, file, fileSystemOptions);
}
示例4: doCreateFileSystem
/**
* Creates a layered file system. This method is called if the file system
* is not cached.
*
* @param scheme The URI scheme.
* @param file The file to create the file system on top of.
* @return The file system.
*/
@Override
protected FileSystem doCreateFileSystem(final String scheme,
final FileObject file,
final FileSystemOptions fileSystemOptions)
throws FileSystemException
{
final FileName name =
new LayeredFileName(scheme, file.getName(), FileName.ROOT_PATH, FileType.FOLDER);
return createFileSystem(name, file, fileSystemOptions);
}
示例5: doCreateFileSystem
/**
* Creates a layered file system. This method is called if the file system
* is not cached.
*
* @param scheme The URI scheme.
* @param file The file to create the file system on top of.
* @return The file system.
*/
@Override
protected FileSystem doCreateFileSystem(final String scheme,
final FileObject file,
final FileSystemOptions fileSystemOptions)
throws FileSystemException
{
final AbstractFileName rootName =
new LayeredFileName(scheme, file.getName(), FileName.ROOT_PATH, FileType.FOLDER);
return new TarFileSystem(rootName, file, fileSystemOptions);
}
示例6: createFileSystem
/**
* Creates an empty virtual file system.
* @param rootUri The root of the file system.
* @return A FileObject in the FileSystem.
* @throws FileSystemException if an error occurs.
*/
public FileObject createFileSystem(final String rootUri) throws FileSystemException
{
final AbstractFileName rootName =
new VirtualFileName(rootUri, FileName.ROOT_PATH, FileType.FOLDER);
// final FileName rootName =
// new BasicFileName(rootUri, FileName.ROOT_PATH);
final VirtualFileSystem fs = new VirtualFileSystem(rootName, null);
addComponent(fs);
return fs.getRoot();
}