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!

Returns  
Blob  

TreeEntry#getTree Async

treeEntry.getTree().then(function(tree) {
  // Use tree
});

Retrieve the tree for this entry. Make sure to call isTree first!

Returns  
Tree  

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

Returns  
Boolean  

TreeEntry#isDirectory Sync

var boolean = treeEntry.isDirectory();

Is this TreeEntry a directory? Alias for isTree

Returns  
Boolean  

TreeEntry#isFile Sync

var boolean = treeEntry.isFile();

Is this TreeEntry a blob? (i.e., a file)

Returns  
Boolean  

TreeEntry#isSubmodule Sync

var boolean = treeEntry.isSubmodule();

Is this TreeEntry a submodule?

Returns  
Boolean  

TreeEntry#isTree Sync

var boolean = treeEntry.isTree();

Is this TreeEntry a tree? (i.e., a directory)

Returns  
Boolean  

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

Returns  
String  

TreeEntry#path Sync

var string = treeEntry.path();

Returns the path for this entry.

Returns  
String  

TreeEntry#sha Sync

var string = treeEntry.sha();

Retrieve the SHA for this TreeEntry.

Returns  
String  

TreeEntry#toObject Async

treeEntry.toObject(repo).then(function(object) {
  // Use object
});
Parameters Type  
repo Repository repository where to lookup the pointed object
Returns  
Object  

TreeEntry#toString Sync

treeEntry.toString();

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