/** * * @param file */ public DefaultFileOperations(final FileObject file) { fileObject = file; fsmanager = file.getFileSystem().getFileSystemManager(); }
/** * create the filecontentinfo implementation */ protected FileContentInfoFactory getFileContentInfoFactory() { return getFileSystem().getFileSystemManager().getFileContentInfoFactory(); }
/** * 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)); }
public FsFileCollector( FileObject fsRoot ) throws FileSystemException { this.fsRoot = fsRoot; FileSystemManager fileSystemManager = fsRoot.getFileSystem().getFileSystemManager(); FileObject root = fileSystemManager.createVirtualFileSystem( fsRoot ); root.createFolder(); this.root = root; }
/** * 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));
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; }
children[i] = getFileSystem().getFileSystemManager().resolveName(name, file, NameScope.CHILD);