/** {@inheritDoc} */ public boolean exists(VirtualFile mountPoint, VirtualFile target) { if (mountPoint.equals(target)) { return true; } final VirtualFile assemblyFile = assembly.getFile(mountPoint, target); if (assemblyFile != null) { return assemblyFile.exists(); } return assembly.contains(mountPoint, target); }
/** {@inheritDoc} */ public List<String> getDirectoryEntries(VirtualFile mountPoint, VirtualFile target) { final VirtualFile assemblyFile = assembly.getFile(mountPoint, target); if (assemblyFile == null) { return new ArrayList<String>(assembly.getChildNames(mountPoint, target)); } final List<String> directoryEntries = new LinkedList<String>(); for (VirtualFile child : assemblyFile.getChildren()) { directoryEntries.add(child.getName()); } return directoryEntries; }
/** {@inheritDoc} */ public CodeSigner[] getCodeSigners(VirtualFile mountPoint, VirtualFile target) { final VirtualFile assemblyFile = assembly.getFile(mountPoint, target); if (assemblyFile == null) { return null; } return assemblyFile.getCodeSigners(); }
private VirtualFile getExistingFile(final VirtualFile mountPoint, final VirtualFile target) throws FileNotFoundException { final VirtualFile assemblyFile = assembly.getFile(mountPoint, target); if (assemblyFile == null) { throw new FileNotFoundException(target.getPathName()); } return assemblyFile; }
/** {@inheritDoc} */ public long getLastModified(VirtualFile mountPoint, VirtualFile target) { final VirtualFile assemblyFile = assembly.getFile(mountPoint, target); return assemblyFile == null ? 0L : assemblyFile.getLastModified(); }
/** {@inheritDoc} */ public boolean isFile(final VirtualFile mountPoint, final VirtualFile target) { final VirtualFile assemblyFile = assembly.getFile(mountPoint, target); return assemblyFile != null && assemblyFile.isFile(); }
/** {@inheritDoc} */ public void close() throws IOException { VFSLogger.ROOT_LOGGER.tracef("Closing assembly filesystem %s", this); assembly.close(); }