List of usage examples for org.apache.commons.vfs FileName ROOT_PATH
String ROOT_PATH
To view the source code for org.apache.commons.vfs FileName ROOT_PATH.
Click Source Link
From source file:com.github.stephenc.javaisotools.vfs.provider.iso.IsoFileProvider.java
protected FileSystem doCreateFileSystem(final String scheme, final FileObject file, final FileSystemOptions fileSystemOptions) throws FileSystemException { final FileName rootName = new LayeredFileName(scheme, file.getName(), FileName.ROOT_PATH, FileType.FOLDER); return new IsoFileSystem(rootName, file, fileSystemOptions); }
From source file:com.bedatadriven.renjin.appengine.AppEngineLocalFilesSystemProvider.java
@Override public FileObject findFile(FileObject baseFile, String uri, FileSystemOptions properties) throws FileSystemException { System.out.println(uri);/*ww w . ja v a2 s .c o m*/ // Parse the name final StringBuffer buffer = new StringBuffer(uri); String scheme = UriParser.extractScheme(uri, buffer); if (scheme == null) { scheme = "file"; } UriParser.fixSeparators(buffer); FileType fileType = UriParser.normalisePath(buffer); final String path = buffer.toString(); // Create the temp file system if it does not exist // FileSystem filesystem = findFileSystem( this, (Properties) null); FileSystem filesystem = findFileSystem(this, properties); if (filesystem == null) { final FileName rootName = getContext().parseURI(scheme + ":" + FileName.ROOT_PATH); filesystem = new LocalFileSystem(rootName, rootFile.getAbsolutePath(), properties); addFileSystem(this, filesystem); } // Find the file return filesystem.resolveFile(path); }
From source file:org.sonatype.gshell.vfs.provider.truezip.TruezipFileProvider.java
/** * Creates a layered file system. This method is called if the file system is not cached. * * @param scheme The URI scheme.//from w w w. j a v a2 s .co m * @param file The file to create the file system on top of. * @return The file system. */ protected FileSystem doCreateFileSystem(final String scheme, final FileObject file, final FileSystemOptions options) throws FileSystemException { FileName name = new LayeredFileName(scheme, file.getName(), FileName.ROOT_PATH, FileType.FOLDER); return new TruezipFileSystem(name, file, options); }