Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDirSize ¶
Types ¶
type DirIterator ¶
type DirIterator struct { CurrentDirContent []fs.DirEntry CurrentDir string NextDirs []string Predicates []Predicate PredicateIndex int Ignore []string }
The state of a directory iterator, which keeps track of the current directory content, and the next directories that can be searched
func NewDirIterator ¶
func NewDirIterator(dir string, pairs []Predicate, ignore []string) *DirIterator
Travserses a directory, and yields all files that should be deleted, based on the predicate-folder pairs passed in
func (*DirIterator) Next ¶
func (d *DirIterator) Next() (string, error)
type Predicate ¶
Struct that represents one predicate-folder pair, which allows us to only search for certain folders within a given directory when a certain file exists (e.g. package.json with node_modules)
type RawConfig ¶
type RawConfig struct {
Predicates []RawPredicate `toml:"sweep"`
}
type RawPredicate ¶
Click to show internal directories.
Click to hide internal directories.