|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.jgit.lib.FileMode
public abstract class FileMode
Constants describing various file modes recognized by GIT.
GIT uses a subset of the available UNIX file permission bits. The
FileMode class provides access to constants defining the modes
actually used by GIT.
| Field Summary | |
|---|---|
static FileMode |
EXECUTABLE_FILE
Mode indicating an entry is an executable FileTreeEntry. |
static FileMode |
GITLINK
Mode indicating an entry is a submodule commit in another repository. |
static FileMode |
MISSING
Mode indicating an entry is missing during parallel walks. |
static FileMode |
REGULAR_FILE
Mode indicating an entry is a non-executable FileTreeEntry. |
static FileMode |
SYMLINK
Mode indicating an entry is a SymlinkTreeEntry. |
static FileMode |
TREE
Mode indicating an entry is a Tree. |
static int |
TYPE_FILE
Bit pattern for TYPE_MASK matching REGULAR_FILE. |
static int |
TYPE_GITLINK
Bit pattern for TYPE_MASK matching GITLINK. |
static int |
TYPE_MASK
Mask to apply to a file mode to obtain its type bits. |
static int |
TYPE_MISSING
Bit pattern for TYPE_MASK matching MISSING. |
static int |
TYPE_SYMLINK
Bit pattern for TYPE_MASK matching SYMLINK. |
static int |
TYPE_TREE
Bit pattern for TYPE_MASK matching TREE. |
| Method Summary | |
|---|---|
void |
copyTo(java.io.OutputStream os)
Copy this mode as a sequence of octal US-ASCII bytes. |
int |
copyToLength()
|
abstract boolean |
equals(int modebits)
Test a file mode for equality with this FileMode object. |
static FileMode |
fromBits(int bits)
Convert a set of mode bits into a FileMode enumerated value. |
int |
getBits()
|
int |
getObjectType()
Get the object type that should appear for this type of mode. |
java.lang.String |
toString()
Format this mode as an octal string (for debugging only). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_MASK
TYPE_TREE,
TYPE_SYMLINK,
TYPE_FILE,
TYPE_GITLINK,
TYPE_MISSING,
Constant Field Valuespublic static final int TYPE_TREE
TYPE_MASK matching TREE.
public static final int TYPE_SYMLINK
TYPE_MASK matching SYMLINK.
public static final int TYPE_FILE
TYPE_MASK matching REGULAR_FILE.
public static final int TYPE_GITLINK
TYPE_MASK matching GITLINK.
public static final int TYPE_MISSING
TYPE_MASK matching MISSING.
public static final FileMode TREE
Tree.
public static final FileMode SYMLINK
SymlinkTreeEntry.
public static final FileMode REGULAR_FILE
FileTreeEntry.
public static final FileMode EXECUTABLE_FILE
FileTreeEntry.
public static final FileMode GITLINK
public static final FileMode MISSING
| Method Detail |
|---|
public static final FileMode fromBits(int bits)
bits - the mode bits the caller has somehow obtained.
public abstract boolean equals(int modebits)
FileMode object.
modebits -
public void copyTo(java.io.OutputStream os)
throws java.io.IOException
The mode is copied as a sequence of octal digits using the US-ASCII character encoding. The sequence does not use a leading '0' prefix to indicate octal notation. This method is suitable for generation of a mode string within a GIT tree object.
os - stream to copy the mode to.
java.io.IOException - the stream encountered an error during the copy.public int copyToLength()
copyTo(OutputStream).public int getObjectType()
See the object type constants in Constants.
public java.lang.String toString()
toString in class java.lang.Objectpublic int getBits()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||