filesystem

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExamineFile

func ExamineFile(parent string, info fs.FileInfo, opts *Context, fileEx FileExaminer) error

func WalkDir

func WalkDir(path string, opts *Context, fileEx FileExaminer) error

Types

type Context

type Context struct {
	SymlinkMode  SymlinkBehaviour
	DupeDetector data.DupeDetector
	DetectorHash hash.Hash
	// contains filtered or unexported fields
}

func (*Context) SetQuota

func (r *Context) SetQuota(mode QuotaMode, quota int64)

type ErrorBehaviour

type ErrorBehaviour int

type FileExaminer

type FileExaminer func(parent string, info fs.FileInfo) error

type QuotaMode

type QuotaMode int
const (
	QuotaDisabled QuotaMode = iota //Disable the quota.
	QuotaCutoff                    //Enable the quota, will stop the current operation if the threshold is exeeded.
	QuotaSkip                      //Enable the quota, will skip the current file if the threshold is exeeded.
)

type SymlinkBehaviour

type SymlinkBehaviour int
const (
	SymlinksRejectAll  SymlinkBehaviour = iota //Reject all symlinks.
	SymlinksRejectDirs                         //Do not resolve symlinks to directories, but follow symlinks to files.
	SymlinksRejectNone                         //Follow all symlinks.
)

Jump to

Keyboard shortcuts

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