Package org.apache.hadoop.fs.permission
Class ChmodParser
java.lang.Object
org.apache.hadoop.fs.permission.ChmodParser
Parse a permission mode passed in from a chmod command and apply that
mode against an existing file.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected shortprotected charprotected shortprotected charprotected charprotected shortprotected booleanprotected shortprotected char -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionshortapplyNewPermission(FileStatus file) Apply permission against specified file and determine what the new mode would beprotected intcombineModes(int existing, boolean exeOk) protected intcombineModeSegments(char type, int mode, int existing, boolean exeOk)
-
Field Details
-
symbolic
protected boolean symbolic -
userMode
protected short userMode -
groupMode
protected short groupMode -
othersMode
protected short othersMode -
stickyMode
protected short stickyMode -
userType
protected char userType -
groupType
protected char groupType -
othersType
protected char othersType -
stickyBitType
protected char stickyBitType
-
-
Constructor Details
-
ChmodParser
- Throws:
IllegalArgumentException
-
-
Method Details
-
applyNewPermission
Apply permission against specified file and determine what the new mode would be- Parameters:
file- File against which to apply mode- Returns:
- File's new mode if applied.
-
combineModes
protected int combineModes(int existing, boolean exeOk) -
combineModeSegments
protected int combineModeSegments(char type, int mode, int existing, boolean exeOk)
-