Documentation
¶
Index ¶
- Variables
- func ApplyOperations(rootDir string, operations []core.FileOperation, executor *Executor, ...) (*core.SortResult, error)
- func ApplyOperationsCtx(ctx context.Context, rootDir string, operations []core.FileOperation, ...) (*core.SortResult, error)
- func ApplyOperationsCtxFS(ctx context.Context, rootDir string, operations []core.FileOperation, ...) (*core.SortResult, error)
- func ApplyOperationsWithFS(rootDir string, operations []core.FileOperation, executor *Executor, ...) (*core.SortResult, error)
- func FilterFiles(rootDir string, sorter core.Sorter, executor *Executor, reporter *Reporter) (*core.SortResult, error)
- func GetHistory() ([]core.Transaction, error)
- func LogToHistory(transaction core.Transaction) error
- func PlanOperations(rootDir string, sorter core.Sorter) ([]core.FileOperation, error)
- func PlanOperationsWithIgnore(rootDir string, sorter core.Sorter, ignoreMatcher *ignore.IgnoreMatcher) ([]core.FileOperation, error)
- func PlanOperationsWithIgnoreCtx(ctx context.Context, rootDir string, sorter core.Sorter, ...) ([]core.FileOperation, error)
- func RunSorter(ctx context.Context, dir string, sorter core.Sorter, ignorePatterns []string) error
- func TopLargestFiles(rootDir string, n int) error
- func Undo(path string) error
- func WalkFiles(rootDir string, fn func(core.FileEntry) error) error
- func WalkFilesWithIgnore(rootDir string, ignoreMatcher *ignore.IgnoreMatcher, ...) error
- func WalkFilesWithIgnoreCtx(ctx context.Context, rootDir string, ignoreMatcher *ignore.IgnoreMatcher, ...) error
- type Executor
- type Reporter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DuplNuke = false RecurseLevel int = 1 << 10 )
View Source
var ( ErrAlreadyUndone = errors.New("last operation already undone") ErrNoHistory = errors.New("no recorded operation found for this directory") )
Functions ¶
func ApplyOperations ¶
func ApplyOperations(rootDir string, operations []core.FileOperation, executor *Executor, reporter *Reporter) (*core.SortResult, error)
func ApplyOperationsCtx ¶
func ApplyOperationsCtx(ctx context.Context, rootDir string, operations []core.FileOperation, executor *Executor, reporter *Reporter) (*core.SortResult, error)
func ApplyOperationsCtxFS ¶
func ApplyOperationsCtxFS(ctx context.Context, rootDir string, operations []core.FileOperation, executor *Executor, reporter *Reporter, fs core.FileSystem) (*core.SortResult, error)
func ApplyOperationsWithFS ¶
func ApplyOperationsWithFS(rootDir string, operations []core.FileOperation, executor *Executor, reporter *Reporter, fs core.FileSystem) (*core.SortResult, error)
func FilterFiles ¶
func GetHistory ¶
func GetHistory() ([]core.Transaction, error)
func LogToHistory ¶
func LogToHistory(transaction core.Transaction) error
func PlanOperations ¶
func PlanOperationsWithIgnore ¶
func PlanOperationsWithIgnore(rootDir string, sorter core.Sorter, ignoreMatcher *ignore.IgnoreMatcher) ([]core.FileOperation, error)
func PlanOperationsWithIgnoreCtx ¶
func PlanOperationsWithIgnoreCtx(ctx context.Context, rootDir string, sorter core.Sorter, ignoreMatcher *ignore.IgnoreMatcher) ([]core.FileOperation, error)
func TopLargestFiles ¶
func WalkFilesWithIgnore ¶
Types ¶
type Executor ¶
type Executor struct {
FS core.FileSystem
Operations []core.FileOperation
}
func (*Executor) ExecuteWithSrc ¶
Click to show internal directories.
Click to hide internal directories.