TreeEntry#filemode Sync
var result = treeEntry.filemode();
Returns |
|
Number |
filemode as an integer |
TreeEntry#filemodeRaw Sync
var result = treeEntry.filemodeRaw();
Returns |
|
Number |
filemode as an integer |
TreeEntry#getBlob Async
treeEntry.getBlob().then(function(blob) {
// Use blob
});
Retrieve the blob for this entry. Make sure to call isBlob
first!
TreeEntry#getTree Async
treeEntry.getTree().then(function(tree) {
// Use tree
});
Retrieve the tree for this entry. Make sure to call isTree
first!
TreeEntry#id Sync
var oid = treeEntry.id();
Returns |
|
Oid |
the oid of the object |
TreeEntry#isBlob Sync
var boolean = treeEntry.isBlob();
Is this TreeEntry a blob? Alias for isFile
TreeEntry#isDirectory Sync
var boolean = treeEntry.isDirectory();
Is this TreeEntry a directory? Alias for isTree
TreeEntry#isFile Sync
var boolean = treeEntry.isFile();
Is this TreeEntry a blob? (i.e., a file)
TreeEntry#isSubmodule Sync
var boolean = treeEntry.isSubmodule();
Is this TreeEntry a submodule?
TreeEntry#isTree Sync
var boolean = treeEntry.isTree();
Is this TreeEntry a tree? (i.e., a directory)
TreeEntry#name Sync
var string = treeEntry.name();
Returns |
|
String |
the name of the file |
TreeEntry#oid Sync
var string = treeEntry.oid();
Retrieve the SHA for this TreeEntry. Alias for sha
TreeEntry#path Sync
var string = treeEntry.path();
Returns the path for this entry.
TreeEntry#sha Sync
var string = treeEntry.sha();
Retrieve the SHA for this TreeEntry.
TreeEntry#toObject Async
treeEntry.toObject(repo).then(function(object) {
// Use object
});
Parameters |
Type |
|
repo |
Repository |
repository where to lookup the pointed object |
TreeEntry#toString Sync
Alias for path
TreeEntry#type Sync
var result = treeEntry.type();
Returns |
|
Number |
the type of the pointed object |
TreeEntry.FILEMODE ENUM
Flag |
Value |
TreeEntry.FILEMODE.UNREADABLE |
0 |
TreeEntry.FILEMODE.TREE |
16384 |
TreeEntry.FILEMODE.BLOB |
33188 |
TreeEntry.FILEMODE.EXECUTABLE |
33261 |
TreeEntry.FILEMODE.LINK |
40960 |
TreeEntry.FILEMODE.COMMIT |
57344 |