Treebuilder.create
Treebuilder.create(repo, source).then(function(treebuilder) {
// Use treebuilder
});
| Parameters | Type | |
|---|---|---|
| repo | Repository | Repository in which to store the object |
| source | Tree | Source tree to initialize the builder (optional) |
| Returns | |
|---|---|
| Treebuilder | the tree builder |
Treebuilder#clear
treebuilder.clear();
Treebuilder#entrycount
var result = treebuilder.entrycount();
| Returns | |
|---|---|
| Number | the number of entries in the treebuilder |
Treebuilder#get
var treeEntry = treebuilder.get(filename);
| Parameters | Type | |
|---|---|---|
| filename | String | Name of the entry |
| Returns | |
|---|---|
| TreeEntry |
Treebuilder#insert
var treeEntry = treebuilder.insert(filename, id, filemode);
| Parameters | Type | |
|---|---|---|
| filename | String | Filename of the entry |
| id | Oid | SHA1 oid of the entry |
| filemode | Number | Folder attributes of the entry. This parameter must be valued with one of the following entries: 0040000, 0100644, 0100755, 0120000 or 0160000. |
| Returns | |
|---|---|
| TreeEntry |
Treebuilder#remove
var result = treebuilder.remove(filename);
| Parameters | Type | |
|---|---|---|
| filename | String | Filename of the entry to remove |
| Returns | |
|---|---|
| Number |
Treebuilder#write
treebuilder.write().then(function(oid) {
// Use oid
});
| Returns | |
|---|---|
| Oid |