Class ChmodParser

java.lang.Object
org.apache.hadoop.fs.permission.ChmodParser

@Private @Unstable public class ChmodParser extends Object
Parse a permission mode passed in from a chmod command and apply that mode against an existing file.
  • 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

  • Method Details

    • 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)