ipurge

package
v0.0.0-...-2421864 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	APP_HOME_PATH = filepath.Join(os.Getenv("HOME"), "Library")
	APP_ROOT_PATH = filepath.Join("/", "Applications")
	LIB_ROOT_PATH = filepath.Join("/", "Library")
	PRIV_VAR_PATH = filepath.Join("/", "private", "var")
	USR_LOCL_PATH = filepath.Join("/", "usr", "local")
	PATHS         = make(map[string]int) // Actual path (string) and MaxDepth (int)
)

Functions

func PurgeDir

func PurgeDir(dir string) error

func WalkDir

func WalkDir(dir string, re *regexp.Regexp, toPurge *[]string, maxDepth int)

WalkDir: walks the directory up to a maximum depth. When it encounters the specified pattern (`re`), it will append that path to the list `toPurge`. If any error is encountered while accessing a directory during the "walk", that directory is skipped.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL