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:
java.io.Serializable,java.lang.Comparable<GitIdentifiers.FileMode>
- Enclosing class:
- GitIdentifiers
public static enum GitIdentifiers.FileMode extends java.lang.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 DIRECTORYA subdirectory.EXECUTABLEA regular, but executable, file.GIT_LINKA gitlink, SHA-1 of the object refers to a commit in another repository.REGULARA regular (non-executable) file.SYMBOLIC_LINKA symbolic link.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GitIdentifiers.FileModevalueOf(java.lang.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.
-
-
-
Enum Constant Detail
-
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.
-
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.
-
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 Detail
-
values
public static GitIdentifiers.FileMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (GitIdentifiers.FileMode c : GitIdentifiers.FileMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GitIdentifiers.FileMode valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-