/** * Get the file mode for given permissions with the correct file type. * @param mode the mode * @return the type with the mode */ protected int getMode(final int mode) { int type = FILE_FLAG; if (isLink()) { type = LINK_FLAG; } else if (isDirectory()) { type = DIR_FLAG; } return type | (mode & PERM_MASK); }
/** * Get the file mode for given permissions with the correct file type. * @param mode the mode * @return the type with the mode */ protected int getMode(final int mode) { int type = FILE_FLAG; if (isLink()) { type = LINK_FLAG; } else if (isDirectory()) { type = DIR_FLAG; } return type | (mode & PERM_MASK); }