GitIdentifiers.FileMode (Apache Commons Codec 1.22.1 API)
Description: declaration: package: org.apache.commons.codec.digest, class: GitIdentifiers, enum: FileMode

Package org.apache.commons.codec.digest

# Enum GitIdentifiers.FileMode

java.lang.Object
java.lang.Enum<GitIdentifiers.FileMode>
org.apache.commons.codec.digest.GitIdentifiers.FileMode

All Implemented Interfaces:
  `Serializable`, `Comparable<GitIdentifiers.FileMode>`

Enclosing class:
  `GitIdentifiers`

public static enum GitIdentifiers.FileMode extends Enum<GitIdentifiers.FileMode>
The type of a Git tree entry, which maps to a Unix file-mode string.

Git encodes the file type and permission bits as an ASCII octal string that precedes the entry name in the binary tree format. The values defined here cover the four entry types that Git itself produces.

See Also:
  - Git Internals – Git Objects

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `DIRECTORY`
  A subdirectory.
  `EXECUTABLE`
  A regular, but executable, file.
  `GIT_LINK`
  A gitlink, SHA-1 of the object refers to a commit in another repository.
  `REGULAR`
  A regular (non-executable) file.
  `SYMBOLIC_LINK`
  A symbolic link.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static GitIdentifiers.FileMode`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static GitIdentifiers.FileMode[]`
  `values()`
  Returns an array containing the constants of this enum type, in the order they are declared.

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

  `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### DIRECTORY

    public static final GitIdentifiers.FileMode DIRECTORY
    A subdirectory. Subdirectories can only be specified by SHA or through a tree mark set with `--import-marks`.
    See Also:
      - git-fast-import - Backend for fast Git data importers

  - ### EXECUTABLE

    public static final GitIdentifiers.FileMode EXECUTABLE
    A regular, but executable, file.

  - ### GIT_LINK

    public static final GitIdentifiers.FileMode GIT_LINK
    A gitlink, SHA-1 of the object refers to a commit in another repository. Git links can only be specified either by SHA or through a commit mark. They are used to implement submodules.
    See Also:
      - gitdatamodel - Git's core data model
      - git-fast-import - Backend for fast Git data importers

  - ### REGULAR

    public static final GitIdentifiers.FileMode REGULAR
    A regular (non-executable) file.

    The majority of files in most projects use this mode. If in doubt, this is what you want.

  - ### SYMBOLIC_LINK

    public static final GitIdentifiers.FileMode SYMBOLIC_LINK
    A symbolic link. The content of the file will be the link target.

- ## Method Details

  - ### values

    public static GitIdentifiers.FileMode[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.
    Returns:
      an array containing the constants of this enum type, in the order they are declared

  - ### valueOf

    public static GitIdentifiers.FileMode valueOf(String name)
    Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum type has no constant with the specified name
      `NullPointerException` - if the argument is null