ChmodParser (Hadoop 0.20.2-cdh3u4 API)
Date: 2012-05-07

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Field Summary
`protected short` | `groupMode`
`protected char` | `groupType`
`protected short` | `othersMode`
`protected char` | `othersType`
`protected char` | `stickyBitType`
`protected short` | `stickyMode`
`protected boolean` | `symbolic`
`protected short` | `userMode`
`protected char` | `userType`

Constructor Summary
`ChmodParser(String modeStr)`

Method Summary
`short` | `applyNewPermission(FileStatus file)` Apply permission against specified file and determine what the new mode would be
`protected int` | `combineModes(int existing, boolean exeOk)`
`protected int` | `combineModeSegments(char type, int mode, int existing, boolean exeOk)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### 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 Detail

### ChmodParser

    public ChmodParser(String modeStr)
                throws IllegalArgumentException

Throws:
  `IllegalArgumentException`

Method Detail

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation