/** * Is this entry a directory? * @return true if this entry is a directory * @since 1.1 */ public boolean isDirectory() { return dirFlag && !isLink(); }
/** * Get the file mode for given permissions with the correct file type. * @param mode the mode * @return the type with the mode * @since 1.1 */ protected int getMode(int mode) { int type = FILE_FLAG; if (isLink()) { type = LINK_FLAG; } else if (isDirectory()) { type = DIR_FLAG; } return type | (mode & PERM_MASK); }