24 lines
569 B
Go
24 lines
569 B
Go
|
package common
|
||
|
|
||
|
import "b612.me/apps/b612/gdu/pkg/fs"
|
||
|
|
||
|
// CurrentProgress struct
|
||
|
type CurrentProgress struct {
|
||
|
CurrentItemName string
|
||
|
ItemCount int
|
||
|
TotalSize int64
|
||
|
}
|
||
|
|
||
|
// ShouldDirBeIgnored whether path should be ignored
|
||
|
type ShouldDirBeIgnored func(name, path string) bool
|
||
|
|
||
|
// Analyzer is type for dir analyzing function
|
||
|
type Analyzer interface {
|
||
|
AnalyzeDir(path string, ignore ShouldDirBeIgnored, constGC bool) fs.Item
|
||
|
SetFollowSymlinks(bool)
|
||
|
SetShowAnnexedSize(bool)
|
||
|
GetProgressChan() chan CurrentProgress
|
||
|
GetDone() SignalGroup
|
||
|
ResetProgress()
|
||
|
}
|