core/src/main/java/org/apache/commons/vfs2/impl/VirtualFileProvider.java
/**
     * Creates a virtual file system, with the supplied file as its root.
     * @param rootFile The root of the file system.
     * @return A FileObject in the FileSystem.
     * @throws FileSystemException if an error occurs.
     */
Creates a virtual file system, with the supplied file as its root.
@param rootFile The root of the file system.
Creates a virtual file system with the supplied file as its root . @param rootFile The root of the file system .
public FileObject createFileSystem(final FileObject rootFile) throws FileSystemException
    {
        final AbstractFileName rootName = (AbstractFileName)
            getContext().getFileSystemManager().resolveName(rootFile.getName(), FileName.ROOT_PATH);
        final VirtualFileSystem fs = new VirtualFileSystem(rootName, rootFile.getFileSystem().getFileSystemOptions());
        addComponent(fs);
        fs.addJunction(FileName.ROOT_PATH, rootFile);
        return fs.getRoot();
    }
public FileObject createFileSystem ( final FileObject rootFile ) throws FileSystemException { final AbstractFileName rootName = ( AbstractFileName ) getContext ( ) . getFileSystemManager ( ) . resolveName ( rootFile . getName ( ) , FileName . ROOT_PATH ) ; final VirtualFileSystem fs = new VirtualFileSystem ( rootName , rootFile . getFileSystem ( ) . getFileSystemOptions ( ) ) ; addComponent ( fs ) ; fs . addJunction ( FileName . ROOT_PATH , rootFile ) ; return fs . getRoot ( ) ; }
Creates a virtual file system, with the supplied file as its root.
Creates a virtual file system with the supplied file as its root .
// final FileName rootName = //    new BasicFileName(rootFile.getName(), FileName.ROOT_PATH);