pathfuncs

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterFullPaths added in v0.5.2

func FilterFullPaths(
	isContinueOnError bool,
	errCollection *errwrappers.Collection,
	filter Filter,
	rootPath string,
	fullPaths ...string,
) *corestr.SimpleSlice

func SimpleFilterFullPaths added in v0.5.2

func SimpleFilterFullPaths(
	isContinueOnError bool,
	filter SimpleFilter,
	fullPaths ...string,
) *errstr.Results

func SimpleFilterFullPathsAsync added in v0.5.2

func SimpleFilterFullPathsAsync(
	isContinueOnError bool,
	filter SimpleFilter,
	fullPaths ...string,
) *errstr.Results

func SimpleFilterFullPathsUsingErrorCollectionAsync added in v0.5.2

func SimpleFilterFullPathsUsingErrorCollectionAsync(
	isContinueOnError bool,
	errCollection *errwrappers.Collection,
	filter SimpleFilter,
	fullPaths ...string,
) []string

Types

type Filter

type Filter func(arg *FilterArg) *FilterResult

type FilterArg

type FilterArg struct {
	RootPath, FileName, FullPath string
	IsFile, IsDirectory          bool
	InputError                   error
	os.FileInfo
}

func (*FilterArg) ExtensionWrapper

func (receiver *FilterArg) ExtensionWrapper() *pathext.Wrapper

type FilterPathToFilterResult added in v0.5.2

type FilterPathToFilterResult func(fullPath string) *FilterResult

type FilterResult

type FilterResult struct {
	FullPath        string
	IsTake, IsBreak bool
	ErrorWrapper    *errorwrapper.Wrapper
}

func FilterResults added in v0.5.2

func FilterResults(
	isContinueOnError bool,
	errCollection *errwrappers.Collection,
	filter Filter,
	rootPath string,
	fullPaths ...string,
) []*FilterResult

func InvalidFilterResult added in v0.5.2

func InvalidFilterResult(
	fullPath string,
) *FilterResult

func InvalidFilterResultUsingErrWp added in v0.5.2

func InvalidFilterResultUsingErrWp(
	fullPath string,
	errWrap *errorwrapper.Wrapper,
) *FilterResult

type ProcessedResult

type ProcessedResult struct {
	Result          string
	IsKeep, IsBreak bool
}

type Processor

type Processor func(index int, currentPath string) (result string)

type ProcessorIn

type ProcessorIn struct {
	Index       int
	CurrentPath string
	Wg          *sync.WaitGroup
}

type SimpleFilter added in v0.5.2

type SimpleFilter func(fullPath string) (isTake bool, err error)

type SimpleFilterUsingArg added in v0.5.2

type SimpleFilterUsingArg func(arg *FilterArg) (isTake bool)

Jump to

Keyboard shortcuts

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