/** * Determines if another file name is an ancestor of this file name. */ public boolean isAncestor(final FileName ancestor) { if (!ancestor.getRootURI().equals(getRootURI())) { return false; } return checkName(ancestor.getPath(), getPath(), NameScope.DESCENDENT); }
/** * Determines if another file name is a descendent of this file name. */ public boolean isDescendent(final FileName descendent, final NameScope scope) { if (!descendent.getRootURI().equals(getRootURI())) { return false; } return checkName(getPath(), descendent.getPath(), scope); }
private synchronized FileObject resolveFile(final FileName name, final boolean useCache) throws FileSystemException if (!rootName.getRootURI().equals(name.getRootURI())) name, rootName, name.getRootURI()});
String fullPath = realBase.getRootURI() + resolvedPath; final FileProvider provider = (FileProvider) providers.get(scheme); if (provider != null)
/** * Attaches this file object to its file resource. */ protected void doAttach() throws Exception { if (file == null) { LayeredFileName layeredFileName = (LayeredFileName) getName(); String fileName = layeredFileName.getOuterName().getRootURI() + layeredFileName.getOuterName().getPathDecoded(); FileObject outer = getFileSystem().resolveFile(fileName); if (outer instanceof TruezipFileObject) { fileName = layeredFileName.getOuterName().getPathDecoded() + getName().getPathDecoded(); file = new File(fileName, ArchiveDetector.ALL); } else { fileObject = outer; DefaultFileSystemManager dfsMgr = (DefaultFileSystemManager) VFS.getManager(); file = new File(dfsMgr.getTemporaryFileStore().allocateFile(getName().getBaseName())); } } }
io.info("Scheme: {}", file.getName().getScheme()); io.info("URI: {}", file.getName().getURI()); io.info("Root URI: {}", file.getName().getRootURI()); io.info("Parent: {}", file.getName().getParent()); io.info("Type: {}", file.getType());
io.info("Scheme: {}", file.getName().getScheme()); io.info("URI: {}", file.getName().getURI()); io.info("Root URI: {}", file.getName().getRootURI()); io.info("Parent: {}", file.getName().getParent()); io.info("Type: {}", file.getType());