mirror of
https://github.com/restic/restic.git
synced 2026-02-03 04:20:45 -05:00
restic rewrite --include
added function Count() to the *TreeWriter methods
This commit is contained in:
parent
b6af01bb28
commit
ee154ce0ab
1 changed files with 6 additions and 0 deletions
|
|
@ -223,6 +223,12 @@ func (t *TreeWriter) Finalize(ctx context.Context) (restic.ID, error) {
|
|||
return id, err
|
||||
}
|
||||
|
||||
// Count returns the number of nodes in the tree
|
||||
func (t *TreeWriter) Count() int {
|
||||
|
||||
return t.builder.countNodes
|
||||
}
|
||||
|
||||
func SaveTree(ctx context.Context, saver restic.BlobSaver, nodes TreeNodeIterator) (restic.ID, error) {
|
||||
treeWriter := NewTreeWriter(saver)
|
||||
for item := range nodes {
|
||||
|
|
|
|||
Loading…
Reference in a new issue