/** * Removes a junction from this file system. */ public void removeJunction(final String junctionPoint) throws FileSystemException { final FileName junctionName = getFileSystemManager().resolveName(getRootName(), junctionPoint); junctions.remove(junctionName); // TODO - remove from parents of junction point // TODO - detach all cached children of the junction point from their real file }
/** * Finds a file in this file system. */ public FileObject resolveFile(final String nameStr) throws FileSystemException { // Resolve the name, and create the file final FileName name = getFileSystemManager().resolveName(rootName, nameStr); return resolveFile(name); }
/** * Returns a child by name. */ public FileObject resolveFile(final String name, final NameScope scope) throws FileSystemException { // return fs.resolveFile(this.name.resolveName(name, scope)); return fs.resolveFile(getFileSystem().getFileSystemManager().resolveName(this.name, name, scope)); }
/** * Finds a file, relative to this file. * * @param path The path of the file to locate. Can either be a relative * path, which is resolved relative to this file, or an * absolute path, which is resolved relative to the file system * that contains this file. */ public FileObject resolveFile(final String path) throws FileSystemException { final FileName otherName = getFileSystem().getFileSystemManager().resolveName(name, path); return fs.resolveFile(otherName); }
getFileSystem() .resolveFile( getFileSystem().getFileSystemManager().resolveName( getName(), UriParser.encode(name), NameScope.CHILD));
FileName name = getFileSystemManager().resolveName(getRootName(), UriParser.encode(entry.getName()));
/** * Locates a file from its parsed URI. */ protected FileObject findFile(final FileName name, final FileSystemOptions fileSystemOptions) throws FileSystemException { // Check in the cache for the file system final FileName rootName = getContext().getFileSystemManager().resolveName(name, FileName.ROOT_PATH); FileSystem fs; synchronized (this) { fs = findFileSystem(rootName, fileSystemOptions); if (fs == null) { // Need to create the file system, and cache it fs = doCreateFileSystem(rootName, fileSystemOptions); addFileSystem(rootName, fs); } } // Locate the file // return fs.resolveFile(name.getPath()); return fs.resolveFile(name); }
private FileObject getLinkDestination() throws FileSystemException { if (linkDestination == null) { final String path = this.fileInfo.getLink(); FileName relativeTo = getName().getParent(); if (relativeTo == null) { relativeTo = getName(); } FileName linkDestinationName = getFileSystem().getFileSystemManager().resolveName(relativeTo, path); linkDestination = getFileSystem().resolveFile(linkDestinationName); } return linkDestination; }
/** * Creates a virtual file system, with the supplied file as its root. */ public FileObject createFileSystem(final FileObject rootFile) throws FileSystemException { final FileName rootName = getContext().getFileSystemManager().resolveName(rootFile.getName(), FileName.ROOT_PATH); // final FileName rootName = // new BasicFileName(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(); }
resolveName(getRootName(), UriParser.encode(name));
resolveName(getRootName(), UriParser.encode(name));
while ((entry = getTarFile().getNextEntry()) != null) FileName name = getFileSystemManager().resolveName(getRootName(), UriParser.encode(entry.getName()));
throws FileSystemException final FileName junctionName = getFileSystemManager().resolveName(getRootName(), junctionPoint);
children[i] = getFileSystem().getFileSystemManager().resolveName(name, file, NameScope.CHILD);