org.apache.hadoop.fs.permission
Class ChmodParser
java.lang.Object
org.apache.hadoop.fs.permission.ChmodParser
public class ChmodParser
- extends Object
Parse a permission mode passed in from a chmod command and apply that
mode against an existing file.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
symbolic
protected boolean symbolic
userMode
protected short userMode
groupMode
protected short groupMode
othersMode
protected short othersMode
userType
protected char userType
groupType
protected char groupType
othersType
protected char othersType
ChmodParser
public ChmodParser(String modeStr)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
applyNewPermission
public short applyNewPermission(FileStatus file)
- 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)
Copyright © 2009 The Apache Software Foundation