seafile_recovery/ls_walker.go

15 lines
255 B
Go
Raw Normal View History

2021-04-26 15:21:03 +00:00
package main
import ("log")
2021-04-27 14:24:01 +00:00
type LsWalker struct {
TotalSize uint64
}
2021-04-26 15:21:03 +00:00
func (lw* LsWalker) onDir(dn *DirNode) {
log.Println(dn.String())
}
func (lw* LsWalker) onFile(fn *FileNode) {
2021-04-27 14:24:01 +00:00
lw.TotalSize += uint64(fn.Ent.Size)
2021-04-26 15:21:03 +00:00
log.Println(fn.String())
}