FsCreateModes (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.fs.permission, class: FsCreateModes

Package org.apache.hadoop.fs.permission

# Class FsCreateModes

java.lang.Object
org.apache.hadoop.fs.permission.FsPermission
org.apache.hadoop.fs.permission.FsCreateModes

All Implemented Interfaces:
  `ObjectInputValidation`, `Serializable`, `Writable`

@Public @Evolving public final class FsCreateModes extends FsPermission
A class that stores both masked and unmasked create modes and is a drop-in replacement for masked permission.

See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class org.apache.hadoop.fs.permission.FsPermission

  `DEFAULT_UMASK, MAX_PERMISSION_LENGTH, UMASK_LABEL`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static FsPermission`
  `applyUMask(FsPermission mode, FsPermission umask)`
  Create from unmasked mode and umask.
  `static FsCreateModes`
  `create(FsPermission masked, FsPermission unmasked)`
  Create from masked and unmasked modes.
  `boolean`
  `equals(Object o)`
  `FsPermission`
  `getMasked()`
  Get masked permission if exists.
  `FsPermission`
  `getUnmasked()`
  Get unmasked permission if exists.
  `int`
  `hashCode()`
  `String`
  `toString()`

  ### Methods inherited from class org.apache.hadoop.fs.permission.FsPermission

  `applyUMask, createImmutable, fromShort, getAclBit, getCachePoolDefault, getDefault, getDirDefault, getEncryptedBit, getErasureCodedBit, getFileDefault, getGroupAction, getOtherAction, getStickyBit, getUMask, getUserAction, read, readFields, setUMask, toExtendedShort, toOctal, toShort, validateObject, valueOf, write`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### applyUMask

    public static FsPermission applyUMask(FsPermission mode, FsPermission umask)
    Create from unmasked mode and umask.
    Parameters:
      `mode` - mode.
      `umask` - umask.
    Returns:
      If the mode is already an FsCreateModes object, return it.

  - ### create

    public static FsCreateModes create(FsPermission masked, FsPermission unmasked)
    Create from masked and unmasked modes.
    Parameters:
      `masked` - masked.
      `unmasked` - unmasked.
    Returns:
      FsCreateModes.

  - ### getMasked

    public FsPermission getMasked()
    Description copied from class: `FsPermission`
    Get masked permission if exists.
    Overrides:
      `getMasked` in class `FsPermission`
    Returns:
      masked.

  - ### getUnmasked

    public FsPermission getUnmasked()
    Description copied from class: `FsPermission`
    Get unmasked permission if exists.
    Overrides:
      `getUnmasked` in class `FsPermission`
    Returns:
      unmasked.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `FsPermission`

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `FsPermission`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `FsPermission`