Print model statistics

This commit is contained in:
Jakob Borg
2013-12-30 09:30:29 -05:00
parent 1c757db153
commit 707e992f19
3 changed files with 85 additions and 22 deletions

View File

@@ -25,6 +25,13 @@ func (f File) Dump() {
fmt.Println()
}
func (f File) Size() (bytes int) {
for _, b := range f.Blocks {
bytes += int(b.Length)
}
return
}
func isTempName(name string) bool {
return strings.HasPrefix(path.Base(name), ".syncthing.")
}