List of usage examples for org.apache.commons.vfs.provider.local LocalFileSystem LocalFileSystem
public LocalFileSystem(final FileName rootName, final String rootFile, final FileSystemOptions opts)
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);/*from w w w. ja va 2 s. c om*/ // 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); }