pathextendinf

package
v1.3.24 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionExecutor

type ActionExecutor interface {
	HasAnyAction() bool
	IsEmptyActions() bool
	Exec() errcoreinf.BasicErrWrapper
	ExecAll() errcoreinf.BaseErrorWrapperCollectionDefiner
}

type ActionExecutorFunc

type ActionExecutorFunc func(extender PathExtender) error

type ActionStacker

type ActionStacker interface {
	Action(action ActionExecutorFunc) PathExtender
}

type AttachModifier

type AttachModifier interface {
	// ParentDir
	//
	//  Actions related to ParentDir
	ParentDir() Modifier
	// RootDir
	//
	//  Actions related to RootDir
	RootDir() Modifier
	// FilePath
	//
	//  Actions related to FilePath
	FilePath() Modifier
}

type Cloner

type Cloner interface {
	Copy() PathExtender
	CloneNew(newFileName string) PathExtender
	CloneRoot(rootPath string) PathExtender
	CloneParentDir(rootPath string) PathExtender
}

type DirFileLister

type DirFileLister interface {
	// Files
	//
	//  Returns all files from top level, no nesting.
	Files() (string, error)
	// FilesRecursively
	//
	//  Returns all files from top level to nesting (Recursively).
	FilesRecursively() (string, error)
	// FilesOrDirs
	//
	//  Returns all files or dirs from top level, no nesting.
	FilesOrDirs() (string, error)
	FilesOrDirsRecursively() (string, error)
	Dirs() (string, error)
	DirsRecursively() (string, error)
	Filter
	AttachModifier
}

type FileListerTyper

type FileListerTyper interface {
	internalpathextender.FileListerTyper
}

type Filter

type Filter interface {
	AllFilesFilter(isRecursive bool, filter FilterFunc) ([]string, error)
	AllDirsFilter(isRecursive bool, filter FilterFunc) ([]string, error)
	AllFilesOrDirsFilter(isRecursive bool, filter FilterFunc) ([]string, error)

	Filter(listType FileListerTyper, filter FilterFunc) ([]string, error)
	FilterAsExtender(listType FileListerTyper, filter FilterFunc) ([]string, error)
	// SkipFilter
	//
	//  Skips the matching criteria
	SkipFilter(listType FileListerTyper, filter FilterFunc) ([]string, error)
	// SkipFilterAsExtender
	//
	//  Skips the matching criteria
	SkipFilterAsExtender(listType FileListerTyper, filter FilterFunc) ([]string, error)
}

type FilterFunc

type FilterFunc func(filePath string) (isTake bool, err error)

type Identifier

type Identifier interface {
	internalpathextender.Identifier
}

type IsPathChecker

type IsPathChecker interface {
	internalpathextender.IsPathChecker
}

type Joiner

type Joiner interface {
	// ParentDir
	//
	//  Join from ParentDir
	ParentDir(relativePaths ...string) string
	ParentDirExtender(relativePaths ...string) PathExtender

	// RootDir
	//
	//  Join from Root Dir
	RootDir(relativePaths ...string) string
	JoinRootDirExtender(relativePaths ...string) PathExtender

	// FullPath
	//
	//  Join from JoinFullPath
	FullPath(relativePaths ...string) string
	FullPathExtender(relativePaths ...string) PathExtender
}

type Modifier

type Modifier interface {
	Create() error
	CreateUsingChmod(mode os.FileMode) error
	Remove() error
	RemoveAllOnExist() error
	ApplyChmod(mode os.FileMode) error
	ApplyChmodRecursively(mode os.FileMode) error
	ApplyChown(user, group string) error
}

type PathExtender

type PathExtender interface {
	PathInfoer
	// ParentDirExtender
	//
	//  Refers to current full-path's parent dir.
	//  ParentDir or ParentDirExtender is different from RootDir.
	ParentDirExtender() PathExtender
	// RootExtender
	//
	//  Refers to start of the dir
	//  For example a repo start point
	RootExtender() PathExtender
	FullPathExtender() PathExtender
	RelativeExtender() PathExtender
	Joiner() Joiner

	IsEqual(right PathExtender) bool
	ActionStacker
	ActionExecutor
	Cloner() Cloner
}

type PathExtenderBinder

type PathExtenderBinder interface {
	PathExtender
	AsPathExtenderBinder() PathExtenderBinder
}

type PathExtenderGetter added in v1.3.3

type PathExtenderGetter interface {
	PathExtender() PathExtender
}

type PathInfoer

type PathInfoer interface {
	IsPathChecker
	internalpathextender.PathInfoer
}

type PathLister

type PathLister interface {
	// ParentDir
	//
	//  Actions related to ParentDir
	ParentDir() DirFileLister
	// RootDir
	//
	//  Actions related to RootDir
	RootDir() DirFileLister
	// FilePath
	//
	//  Actions related to FilePath
	FilePath() DirFileLister
}

type PathRequestTyper

type PathRequestTyper interface {
	internalpathextender.PathRequestTyper
}

Jump to

Keyboard shortcuts

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