new TreeEntry(rawRepo, rawTreeEntry)
Convenience tree entry constructor.
Parameters:
Name | Type | Description |
---|---|---|
rawRepo |
git.raw.Repo | Raw repository object. |
rawTreeEntry |
git.raw.TreeEntry | Raw tree entry object. |
- Source:
- tree_entry.js, line 21
Members
-
<readonly> fileModes :Integer
-
Refer to vendor/libgit2/include/git2/types.h for filemode definitions.
- Source:
- tree_entry.js, line 41
Properties:
Name Type Default Description GIT_FILEMODE_NEW
Integer git.raw.TreeEntry.fileModes.GIT_FILEMODE_NEW 0 (0000000) GIT_FILEMODE_TREE
Integer git.raw.TreeEntry.fileModes.GIT_FILEMODE_TREE 16384 (0040000) GIT_FILEMODE_BLOB
Integer git.raw.TreeEntry.fileModes.GIT_FILEMODE_BLOB 33188 (0100644) GIT_FILEMODE_BLOB_EXECUTABLE
Integer git.raw.TreeEntry.fileModes.GIT_FILEMODE_BLOB_EXECUTABLE 33261 (0100755) GIT_FILEMODE_LINK
Integer git.raw.TreeEntry.fileModes.GIT_FILEMODE_LINK 40960 (0120000) GIT_FILEMODE_COMMIT
Integer git.raw.TreeEntry.fileModes.GIT_FILEMODE_COMMIT 57344 (0160000)
Methods
-
content(callback)
-
Retrieve the TreeEntry's content.
Parameters:
Name Type Description callback
TreeEntry~contentCallback - Source:
- tree_entry.js, line 204
-
isDirectory(callback)
-
Determine whether this Tree Entry is a directory.
Parameters:
Name Type Description callback
TreeEntry~isDirectoryCallback - Source:
- tree_entry.js, line 120
-
isFile(callback)
-
Determine whether this TreeEntry is a file (blob or blob executable).
Parameters:
Name Type Description callback
TreeEntry~isFileCallback - Source:
- tree_entry.js, line 96
-
name(callback)
-
Retrieve the name for this TreeEntry.
Parameters:
Name Type Description callback
TreeEntry~nameCallback - Source:
- tree_entry.js, line 144
-
oid(callback)
-
Retrieve the Oid for this TreeEntry.
Parameters:
Name Type Description callback
TreeEntry~oidCallback - Source:
- tree_entry.js, line 55
-
path(callback)
-
Retrieve the path relative to the repository root for this TreeEntry.
Parameters:
Name Type Description callback
TreeEntry~pathCallback - Source:
- tree_entry.js, line 180
-
root(callback)
-
Retrieve the entry's root path.
Parameters:
Name Type Description callback
TreeEntry~rootCallback - Source:
- tree_entry.js, line 162
-
sha(callback)
-
Retrieve the SHA for this TreeEntry.
Parameters:
Name Type Description callback
TreeEntry~shaCallback - Source:
- tree_entry.js, line 73
-
toBlob(callback)
-
Convert the TreeEntry to a blob.
Parameters:
Name Type Description callback
TreeEntry~blobCallback - Source:
- tree_entry.js, line 227
-
tree(callback)
-
Retrieve the TreeEntry's Tree.
Parameters:
Name Type Description callback
TreeEntry~treeCallback - Source:
- tree_entry.js, line 246
Type Definitions
-
blobCallback(error, blob)
-
Parameters:
Name Type Description error
GitError | null An Error or null if successful. blob
Blob | null the blob representation of the entry. - Source:
- tree_entry.js, line 228
-
contentCallback(error, content)
-
Parameters:
Name Type Description error
GitError | null An Error or null if successful. content
String | null the entry's content. - Source:
- tree_entry.js, line 205
-
isDirectoryCallback(error, content)
-
Parameters:
Name Type Description error
GitError | null An Error or null if successful. content
Boolean | null True if the entry is a directory, false otherwise. - Source:
- tree_entry.js, line 121
-
isFileCallback(error, content)
-
Parameters:
Name Type Description error
GitError | null An Error or null if successful. content
Boolean | null True if the entry is a blob or blob executable, false otherwise. - Source:
- tree_entry.js, line 97
-
nameCallback(error, name)
-
Parameters:
Name Type Description error
GitError | null An Error or null if successful. name
String | null the entry's name. - Source:
- tree_entry.js, line 145
-
oidCallback(error, oid)
-
Parameters:
Name Type Description error
GitError | null An Error or null if successful. oid
TreeEntry | null The Oid object or null. - Source:
- tree_entry.js, line 56
-
pathCallback(error, path)
-
Parameters:
Name Type Description error
GitError | null An Error or null if successful. path
String | null the entry's full path relative to repository. - Source:
- tree_entry.js, line 181
-
rootCallback(error, root)
-
Parameters:
Name Type Description error
GitError | null An Error or null if successful. root
String | null the entry's root path, relative to repository. - Source:
- tree_entry.js, line 163
-
shaCallback(error, sha)
-
Parameters:
Name Type Description error
GitError | null An Error or null if successful. sha
String | null The SHA object or null. - Source:
- tree_entry.js, line 74
-
treeCallback(error, tree)
-
Parameters:
Name Type Description error
GitError | null An Error or null if successful. tree
Tree | null the entry's tree. - Source:
- tree_entry.js, line 247