fork/gdu
git clone https://git.julia.blue/fork/gdu
99a7f2a
ignore
1// Package common contains commong logic and interfaces used across Gdu 2// nolint: revive //Why: this is common package 3package common 4 5import ( 6"time" 7 8"github.com/dundee/gdu/v5/pkg/fs" 9) 10 11// CurrentProgress struct 12type CurrentProgress struct { 13CurrentItemName string 14ItemCount int64 15TotalUsage int64 16} 17 18// ShouldDirBeIgnored whether path should be ignored 19type ShouldDirBeIgnored func (name ,path string )bool 20 21// ShouldFileBeIgnored whether file should be ignored based on type 22type ShouldFileBeIgnored func (name string )bool 23 24// Analyzer is type for dir analyzing function 25type Analyzer interface { 26AnalyzeDir (path string ,ignore ShouldDirBeIgnored ,fileTypeFilter ShouldFileBeIgnored ) fs.Item 27SetFollowSymlinks (bool ) 28SetShowAnnexedSize (bool ) 29SetTimeFilter (timeFilter TimeFilter ) 30SetArchiveBrowsing (bool ) 31SetFileTypeFilter (filter ShouldFileBeIgnored ) 32Cancel () 33GetDone ()SignalGroup 34GetProgress ()CurrentProgress 35ResetProgress () 36} 37 38// TimeFilter represents a function that determines if a file should be included based on its mtime 39type TimeFilter func (mtime time.Time )bool