@Override public boolean isOther() { return entry.isType(SPECIAL); }
@Override public boolean isSymbolicLink() { return entry.isType(SYMLINK); }
@Override public boolean isRegularFile() { return entry.isType(FILE); }
@Override public boolean isDirectory() { return entry.isType(DIRECTORY); }
/** * Similar to its super class implementation, but returns * {@code false} for a valid archive file, too. * <p> * For archive file validation its virtual file system gets mounted. * In case a RAES encrypted ZIP file gets mounted, the user gets prompted * for its password unless the default configuration for key management * hasn't been overridden. * * @see <a href="#falsePositives">Detecting Archive Paths and False Positives</a> */ @Override @FsAssertion(atomic=YES, consistent=YES, isolated=YES, durable=NOT_APPLICABLE) public boolean isFile() { if (null != innerArchive) { try { final FsNode entry = innerArchive.getController() .node(getAccessPreferences(), getNodeName()); return null != entry && entry.isType(FILE); } catch (IOException ex) { return false; } } return file.isFile(); }
/** * Similar to its super class implementation, but returns * {@code true} for a valid archive file, too. * <p> * For archive file validation its virtual file system gets mounted. * In case a RAES encrypted ZIP file gets mounted, the user gets prompted * for its password unless the default configuration for key management * hasn't been overridden. * * @see <a href="#falsePositives">Detecting Archive Paths and False Positives</a> * @see #isArchive * @see #isEntry */ @Override @FsAssertion(atomic=YES, consistent=YES, isolated=YES, durable=NOT_APPLICABLE) public boolean isDirectory() { if (null != innerArchive) { try { final FsNode entry = innerArchive.getController() .node(getAccessPreferences(), getNodeName()); return null != entry && entry.isType(DIRECTORY); } catch (IOException ex) { return false; } } return file.isDirectory(); }
final FsNode entry = controller .node(getAccessPreferences(), innerEntryName); if (null == entry || !entry.isType(DIRECTORY)) throw ex;
if (null == srcEntry) throw new NoSuchFileException(src.toString()); if (!srcEntry.isType(FILE)) throw new FileSystemException(src.toString(), null, "Expected type FILE, but is " + srcEntry.getTypes() + "!"); if (o.get(EXCLUSIVE)) throw new FileAlreadyExistsException(dst.toString()); if (dstEntry.isType(DIRECTORY)) dst.delete();