elitepath

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: MIT Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasePathPermission added in v0.3.5

type BasePathPermission struct {
	RwxInstruction *chmodins.RwxInstruction `json:"RwxInstruction,omitempty"`
	Chown          *pathinsfmt.Chown        `json:"Chown,omitempty"`
}

func (*BasePathPermission) HasChown added in v0.3.5

func (it *BasePathPermission) HasChown() bool

func (*BasePathPermission) HasRwx added in v0.3.5

func (it *BasePathPermission) HasRwx() bool

func (*BasePathPermission) IsEmptyChown added in v0.3.5

func (it *BasePathPermission) IsEmptyChown() bool

func (*BasePathPermission) IsEmptyRwx added in v0.3.5

func (it *BasePathPermission) IsEmptyRwx() bool

type Directory added in v0.3.5

type Directory struct {
	WithPermission
	IsClearDir                bool `json:"IsClearDir,omitempty"`
	IsApplyDefaultChmodGroups bool `json:"IsApplyDefaultChmodGroups,omitempty"`
}

func NewDirectory added in v0.3.6

func NewDirectory(isClear, isDefaultChmod bool, location string) *Directory

type ExistFilter added in v0.3.5

type ExistFilter struct {
	IsExist bool
	IsDir   bool
}

func (*ExistFilter) IsMatch added in v0.3.5

func (it *ExistFilter) IsMatch(path *Path) bool

func (*ExistFilter) IsMatchLazy added in v0.3.5

func (it *ExistFilter) IsMatchLazy(lazyPath *LazyPath) bool

type Filter added in v0.3.5

type Filter struct {
	NameFilter      *ValueFilter `json:"NameFilter,omitempty"`
	PathFilter      *ValueFilter `json:"PathFilter,omitempty"`
	ExistFilter     *ExistFilter `json:"ExistFilter,omitempty"`
	NameRegexFilter string       `json:"NameRegexFilter,omitempty"`
	PathRegexFilter string       `json:"PathRegexFilter,omitempty"`
}

func (*Filter) IsMatch added in v0.3.5

func (it *Filter) IsMatch(path *Path) bool

func (*Filter) IsMatchLazy added in v0.3.5

func (it *Filter) IsMatchLazy(lazyPath *LazyPath) bool

type LazyPath added in v0.3.5

type LazyPath struct {
	Path *Path
	// contains filtered or unexported fields
}

func NewLazyPath added in v0.3.5

func NewLazyPath(path *Path) *LazyPath

func (*LazyPath) Clone added in v0.3.5

func (it *LazyPath) Clone() *LazyPath

func (*LazyPath) Error added in v0.3.5

func (it *LazyPath) Error() error

func (*LazyPath) ErrorWrapper added in v0.3.5

func (it *LazyPath) ErrorWrapper() *errorwrapper.Wrapper

func (*LazyPath) FileInfo added in v0.3.5

func (it *LazyPath) FileInfo() os.FileInfo

func (*LazyPath) FileMode added in v0.3.5

func (it *LazyPath) FileMode() os.FileMode

func (*LazyPath) HasFileInfo added in v0.3.5

func (it *LazyPath) HasFileInfo() bool

func (*LazyPath) IsDir added in v0.3.5

func (it *LazyPath) IsDir() bool

func (*LazyPath) IsExist added in v0.3.5

func (it *LazyPath) IsExist() bool

func (*LazyPath) IsExistButDir added in v0.3.8

func (it *LazyPath) IsExistButDir() bool

func (*LazyPath) IsExistButFile added in v0.3.8

func (it *LazyPath) IsExistButFile() bool

func (*LazyPath) IsFile added in v0.3.5

func (it *LazyPath) IsFile() bool

func (*LazyPath) LocationInfo added in v0.3.5

func (it *LazyPath) LocationInfo() *pathhelper.LocationInfo

func (*LazyPath) PathExistStat added in v0.3.5

func (it *LazyPath) PathExistStat() *chmodhelper.PathExistStat

func (*LazyPath) SimpleStat added in v0.3.5

func (it *LazyPath) SimpleStat() *pathchmod.SimpleStat

type Path

type Path struct {
	pathfixer.Location
	// contains filtered or unexported fields
}

func NewPathDefault added in v0.3.7

func NewPathDefault(path string) *Path

func NewPathExpandNormalizeDefault added in v0.3.7

func NewPathExpandNormalizeDefault(path string) *Path

func (*Path) AllDirsSimpleStat added in v0.3.6

func (it *Path) AllDirsSimpleStat() (*pathchmod.SimpleStats, *errorwrapper.Wrapper)

func (*Path) AllFilesSimpleStat added in v0.3.6

func (it *Path) AllFilesSimpleStat() (*pathchmod.SimpleStats, *errorwrapper.Wrapper)

func (*Path) AllPaths added in v0.3.6

func (it *Path) AllPaths() *errstr.Results

AllPaths returns all immediate paths but not nested or recursive paths.

func (*Path) AllPathsSimpleStat added in v0.3.6

func (it *Path) AllPathsSimpleStat() (*pathchmod.SimpleStats, *errorwrapper.Wrapper)

func (*Path) ApplyChown

func (it *Path) ApplyChown(
	chown *pathinsfmt.Chown,
) *errorwrapper.Wrapper

func (*Path) ApplyFileMode

func (it *Path) ApplyFileMode(mode os.FileMode) *errorwrapper.Wrapper

func (*Path) ApplyPathVerifier

func (it *Path) ApplyPathVerifier(
	isSkipOnInvalid bool,
	errorCollection *errwrappers.Collection,
	pathVerifier *pathinsfmt.PathVerifier,
) (isSuccess bool)

func (*Path) ApplyPathVerifiers

func (it *Path) ApplyPathVerifiers(
	errorCollection *errwrappers.Collection,
	pathVerifiers *pathinsfmt.PathVerifiers,
) (isSuccess bool)

func (*Path) ApplyRwxInstruction

func (it *Path) ApplyRwxInstruction(
	rwx *chmodins.RwxInstruction,
) *errorwrapper.Wrapper

func (*Path) BaseDir added in v0.3.5

func (it *Path) BaseDir() string

func (*Path) BothExt added in v0.3.5

func (it *Path) BothExt() (dotExt, ext string)

func (*Path) CheckSummer added in v0.3.5

func (it *Path) CheckSummer(
	isAsync,
	isRecursive bool,
	hashMethod hashas.Variant,
) *checksummer.Instance

func (*Path) ChmodCondition

func (it *Path) ChmodCondition() *chmodins.Condition

func (*Path) ClonePath

func (it *Path) ClonePath() *Path

func (*Path) ClonePathUsingNew

func (it *Path) ClonePathUsingNew(newLocation string) *Path

func (*Path) Combine

func (it *Path) Combine(relativePaths ...string) string

func (*Path) CombineWithElitePaths added in v0.3.5

func (it *Path) CombineWithElitePaths(
	enhancePaths ...*Path,
) string

func (*Path) CombineWithElitePathsToElitePath added in v0.3.5

func (it *Path) CombineWithElitePathsToElitePath(
	enhancePaths ...*Path,
) *Path

func (*Path) CopyTo added in v0.3.5

func (it *Path) CopyTo(
	isClearBefore,
	isRecursive bool,
	toPath string,
) *errorwrapper.Wrapper

func (*Path) DeletePath added in v0.3.5

func (it *Path) DeletePath(isSkipOnNonExist bool) *errorwrapper.Wrapper

func (*Path) Directories added in v0.3.6

func (it *Path) Directories() *errstr.Results

Directories it doesn't return recursive directories but just immediate nested directories

func (*Path) FileNameWithExt added in v0.3.5

func (it *Path) FileNameWithExt() string

func (*Path) FileNameWithoutExt added in v0.3.5

func (it *Path) FileNameWithoutExt() string

func (*Path) Files added in v0.3.6

func (it *Path) Files() *errstr.Results

Files it doesn't return recursive files but just immediate nested files

func (*Path) FixedPathAsSlice

func (it *Path) FixedPathAsSlice() []string

func (*Path) IsChecksumEqual added in v0.3.5

func (it *Path) IsChecksumEqual(
	isRecursive bool,
	hashMethod hashas.Variant,
	comparingPath string,
) bool

func (*Path) IsDotExtension added in v0.3.8

func (it *Path) IsDotExtension(dotExtCompare string) bool

func (*Path) IsEqual added in v0.3.5

func (it *Path) IsEqual(another *Path) bool

func (*Path) IsEqualWithoutOptions added in v0.3.5

func (it *Path) IsEqualWithoutOptions(another *Path) bool

func (*Path) IsExtension added in v0.3.8

func (it *Path) IsExtension(extCompare string) bool

func (*Path) IsFilterMatch added in v0.3.5

func (it *Path) IsFilterMatch(filter *Filter) bool

func (*Path) Join added in v0.3.5

func (it *Path) Join(location string) string

func (*Path) Join2 added in v0.3.5

func (it *Path) Join2(location1, location2 string) string

func (*Path) Joins added in v0.3.5

func (it *Path) Joins(isNormalize bool, locations ...string) string

func (*Path) JoinsToPath added in v0.3.5

func (it *Path) JoinsToPath(
	relativePaths ...string,
) *Path

func (*Path) LazyPath added in v0.3.5

func (it *Path) LazyPath() *LazyPath

func (*Path) LocationInfo

func (it *Path) LocationInfo() *pathhelper.LocationInfo

func (*Path) Move added in v0.3.5

func (it *Path) Move(toPath string) *errorwrapper.Wrapper

func (*Path) MoveTo added in v0.3.5

func (it *Path) MoveTo(
	isClearBefore,
	isRecursive bool,
	toPath string,
) *errorwrapper.Wrapper

func (*Path) NotDirError added in v0.3.6

func (it *Path) NotDirError() *errorwrapper.Wrapper

func (*Path) NotFileError added in v0.3.6

func (it *Path) NotFileError() *errorwrapper.Wrapper

func (*Path) OsFile added in v0.3.6

func (it *Path) OsFile(
	existingErrorWrapper *errorwrapper.Wrapper,
	osFlag int,
	fileMode os.FileMode,
) *fs.OsFile

OsFile use fs.Flag to use appropriate file flags

Must call fs.OsFile.AttachDeferCloseOnRequire()

func (*Path) ParentDir added in v0.3.5

func (it *Path) ParentDir() string

func (*Path) ParentDirPath added in v0.3.6

func (it *Path) ParentDirPath() *Path

func (*Path) PathExtWrapper

func (it *Path) PathExtWrapper() *pathext.Wrapper

func (*Path) PathLinuxStat

func (it *Path) PathLinuxStat() *pathstatlinux.Info

func (*Path) PathWrapper

func (it *Path) PathWrapper() pathwrapper.Wrapper

func (*Path) ReadFileBytes

func (it *Path) ReadFileBytes() *errbyte.Results

func (*Path) ReadFileBytesMust added in v0.3.6

func (it *Path) ReadFileBytesMust() []byte

func (*Path) ReadFileString

func (it *Path) ReadFileString() *errstr.Result

func (*Path) ReadFileStringMust added in v0.3.6

func (it *Path) ReadFileStringMust() string

func (*Path) ReadFileUnmarshal

func (it *Path) ReadFileUnmarshal(
	unmarshallingObjectRef interface{},
) *errorwrapper.Wrapper

func (*Path) ReadJsonParseSelfInjector

func (it *Path) ReadJsonParseSelfInjector(
	injector corejson.JsonParseSelfInjector,
) *errorwrapper.Wrapper

func (*Path) ReadLines added in v0.3.6

func (it *Path) ReadLines() *errstr.Results

func (*Path) ReadLinesMust added in v0.3.6

func (it *Path) ReadLinesMust() []string

func (*Path) RecursiveDirPaths added in v0.3.5

func (it *Path) RecursiveDirPaths(
	isRelativePath bool,
	excludeRootNames ...string,
) *corestr.SimpleSlice

func (*Path) RecursiveFilePaths added in v0.3.5

func (it *Path) RecursiveFilePaths(
	isRelativePath bool,

	excludeRootNames ...string,
) *corestr.SimpleSlice

func (*Path) RecursivePathsAll added in v0.3.5

func (it *Path) RecursivePathsAll(
	isRelativePath bool,
	isExcludeRootName bool,
	excludeRootNames ...string,
) *corestr.SimpleSlice

func (*Path) RwxWrapper

func (it *Path) RwxWrapper() *pathchmod.RwxWrapperWithError

func (*Path) SimpleStat

func (it *Path) SimpleStat() *pathchmod.SimpleStat

func (*Path) VerifyCheckSumTreeError added in v0.3.5

func (it *Path) VerifyCheckSumTreeError(
	isRecursive bool,
	hashMethod hashas.Variant,
	comparingPath string,
) *errwrappers.Collection

func (*Path) WriteLines added in v0.3.6

func (it *Path) WriteLines(lines []string) *errorwrapper.Wrapper

type PathCollection added in v0.3.5

type PathCollection struct {
	Items []*Path `json:"Items,omitempty"`
}

func EmptyPathCollection added in v0.3.5

func EmptyPathCollection() *PathCollection

func NewPathCollection added in v0.3.5

func NewPathCollection(
	isSkipEmpty,
	isNormalize,
	isExpandEnvVars bool,
	overridingPathOptions *pathfixer.PathOptions,
	collection ...string,
) *PathCollection

func NewPathCollectionDirect added in v0.3.5

func NewPathCollectionDirect(
	options *pathfixer.PathOptions,
	collection ...string,
) *PathCollection

func NewPathCollectionUsingCapacity added in v0.3.5

func NewPathCollectionUsingCapacity(capacity int) *PathCollection

func (*PathCollection) Add added in v0.3.5

func (it *PathCollection) Add(path *Path) *PathCollection

func (*PathCollection) AddCollections added in v0.3.5

func (it *PathCollection) AddCollections(
	collections ...*PathCollection,
) *PathCollection

func (*PathCollection) AddDir added in v0.3.5

func (it *PathCollection) AddDir(path *Path) *PathCollection

func (*PathCollection) AddFile added in v0.3.5

func (it *PathCollection) AddFile(
	path *Path,
) *PathCollection

func (*PathCollection) AddFilterMatch added in v0.3.5

func (it *PathCollection) AddFilterMatch(
	filter *Filter, path *Path,
) *PathCollection

func (*PathCollection) AddIf added in v0.3.5

func (it *PathCollection) AddIf(
	isAdd bool, path *Path,
) *PathCollection

func (*PathCollection) AddValid added in v0.3.5

func (it *PathCollection) AddValid(path *Path) *PathCollection

func (*PathCollection) AddsFilterMatch added in v0.3.5

func (it *PathCollection) AddsFilterMatch(
	filter *Filter, paths ...*Path,
) *PathCollection

func (*PathCollection) AddsRaw added in v0.3.5

func (it *PathCollection) AddsRaw(paths ...string) *PathCollection

func (*PathCollection) AddsRawUsingOption added in v0.3.5

func (it *PathCollection) AddsRawUsingOption(
	options pathfixer.PathOptions,
	paths ...string,
) *PathCollection

func (*PathCollection) AddsRawValid added in v0.3.5

func (it *PathCollection) AddsRawValid(paths ...string) *PathCollection

func (*PathCollection) AllDirs added in v0.3.5

func (it *PathCollection) AllDirs() []string

func (*PathCollection) AllDirsPaths added in v0.3.5

func (it *PathCollection) AllDirsPaths() *PathCollection

func (*PathCollection) AllExistPaths added in v0.3.5

func (it *PathCollection) AllExistPaths() []string

func (*PathCollection) AllExistPathsCollection added in v0.3.5

func (it *PathCollection) AllExistPathsCollection() *PathCollection

func (*PathCollection) AllFiles added in v0.3.5

func (it *PathCollection) AllFiles() []string

func (*PathCollection) AllFilesPaths added in v0.3.5

func (it *PathCollection) AllFilesPaths() *PathCollection

func (*PathCollection) AsBasicSliceContractsBinder added in v0.3.5

func (it *PathCollection) AsBasicSliceContractsBinder() coreinterface.BasicSlicerContractsBinder

func (*PathCollection) AsJsonMarshaller added in v0.3.8

func (it *PathCollection) AsJsonMarshaller() corejson.JsonMarshaller

func (*PathCollection) AsJsonParseSelfInjector added in v0.3.8

func (it *PathCollection) AsJsonParseSelfInjector() corejson.JsonParseSelfInjector

func (*PathCollection) AsJsoner added in v0.3.8

func (it *PathCollection) AsJsoner() corejson.Jsoner

func (*PathCollection) ConcatNew added in v0.3.5

func (it *PathCollection) ConcatNew(
	collections ...*PathCollection,
) *PathCollection

func (*PathCollection) Count added in v0.3.5

func (it *PathCollection) Count() int

func (*PathCollection) ExecuteAll added in v0.3.7

func (it *PathCollection) ExecuteAll(
	isContinueOnError bool,
	errCollection *errwrappers.Collection,
	exeFunc func(path *Path) *errorwrapper.Wrapper,
) (isSuccess bool)

func (*PathCollection) Filter added in v0.3.5

func (it *PathCollection) Filter(filter *Filter) []string

func (*PathCollection) FilterPathCollection added in v0.3.5

func (it *PathCollection) FilterPathCollection(filter *Filter) *PathCollection

func (*PathCollection) First added in v0.3.5

func (it *PathCollection) First() *Path

func (*PathCollection) FirstDynamic added in v0.3.5

func (it *PathCollection) FirstDynamic() interface{}

func (*PathCollection) FirstOrDefault added in v0.3.5

func (it *PathCollection) FirstOrDefault() *Path

func (*PathCollection) FirstOrDefaultDynamic added in v0.3.5

func (it *PathCollection) FirstOrDefaultDynamic() interface{}

func (*PathCollection) HasAnyItem added in v0.3.5

func (it *PathCollection) HasAnyItem() bool

func (*PathCollection) HasIndex added in v0.3.5

func (it *PathCollection) HasIndex(index int) bool

func (*PathCollection) IsEmpty added in v0.3.5

func (it *PathCollection) IsEmpty() bool

func (*PathCollection) Json added in v0.3.8

func (it *PathCollection) Json() *corejson.Result

func (*PathCollection) JsonModel added in v0.3.8

func (it *PathCollection) JsonModel() *PathCollection

func (*PathCollection) JsonModelAny added in v0.3.8

func (it *PathCollection) JsonModelAny() interface{}

func (*PathCollection) JsonParseSelfInject added in v0.3.8

func (it *PathCollection) JsonParseSelfInject(
	jsonResult *corejson.Result,
) error

func (*PathCollection) Last added in v0.3.5

func (it *PathCollection) Last() *Path

func (*PathCollection) LastDynamic added in v0.3.5

func (it *PathCollection) LastDynamic() interface{}

func (*PathCollection) LastIndex added in v0.3.5

func (it *PathCollection) LastIndex() int

func (*PathCollection) LastOrDefault added in v0.3.5

func (it *PathCollection) LastOrDefault() interface{}

func (*PathCollection) LastOrDefaultDynamic added in v0.3.5

func (it *PathCollection) LastOrDefaultDynamic() interface{}

func (*PathCollection) Length added in v0.3.5

func (it *PathCollection) Length() int

func (*PathCollection) Limit added in v0.3.5

func (it *PathCollection) Limit(limit int) *PathCollection

func (*PathCollection) LimitDynamic added in v0.3.5

func (it *PathCollection) LimitDynamic(limit int) interface{}

func (*PathCollection) MarshalJSON added in v0.3.8

func (it *PathCollection) MarshalJSON() ([]byte, error)

func (*PathCollection) ParseInjectUsingJson added in v0.3.8

func (it *PathCollection) ParseInjectUsingJson(
	jsonResult *corejson.Result,
) (*PathCollection, error)

func (*PathCollection) ParseInjectUsingJsonMust added in v0.3.8

func (it *PathCollection) ParseInjectUsingJsonMust(
	jsonResult *corejson.Result,
) *PathCollection

ParseInjectUsingJsonMust Panic if error

func (*PathCollection) PathMatchesWithRegex added in v0.3.5

func (it *PathCollection) PathMatchesWithRegex(regexp *regexp.Regexp) []string

func (*PathCollection) ReadFromFile added in v0.3.8

func (it *PathCollection) ReadFromFile(
	filePath string,
) *errorwrapper.Wrapper

func (*PathCollection) SaveToFile added in v0.3.8

func (it *PathCollection) SaveToFile(
	filePath string,
) *errorwrapper.Wrapper

func (*PathCollection) Skip added in v0.3.5

func (it *PathCollection) Skip(skippingItemsCount int) *PathCollection

func (*PathCollection) SkipDynamic added in v0.3.5

func (it *PathCollection) SkipDynamic(skippingItemsCount int) interface{}

func (*PathCollection) String added in v0.3.5

func (it *PathCollection) String() string

func (*PathCollection) Strings added in v0.3.5

func (it *PathCollection) Strings() []string

func (*PathCollection) Take added in v0.3.5

func (it *PathCollection) Take(takeDynamicItems int) *PathCollection

func (*PathCollection) TakeDynamic added in v0.3.5

func (it *PathCollection) TakeDynamic(takeDynamicItems int) interface{}

func (*PathCollection) UnmarshalJSON added in v0.3.8

func (it *PathCollection) UnmarshalJSON(
	data []byte,
) error

type ValueFilter added in v0.3.5

type ValueFilter struct {
	Value           string
	IsCaseSensitive bool
	Compare         stringcompareas.Variant
}

func (*ValueFilter) IsIgnoreCase added in v0.3.7

func (it *ValueFilter) IsIgnoreCase() bool

func (*ValueFilter) IsMatch added in v0.3.5

func (it *ValueFilter) IsMatch(content string) bool

type WithPermission added in v0.3.5

type WithPermission struct {
	Path
	BasePathPermission
	PathVerifiers *pathinsfmt.PathVerifiers `json:"PathVerifiers,omitempty"`
	PathVerifier  *pathinsfmt.PathVerifier  `json:"PathVerifier,omitempty"`
}

func NewWithPermissionPtr added in v0.3.5

func NewWithPermissionPtr(
	isNormalize,
	isExpandEnvVars bool,
	location string,
) *WithPermission

func NewWithPermissionRwxChown added in v0.3.5

func NewWithPermissionRwxChown(
	isNormalize,
	isExpandEnvVars bool,
	rwx *chmodins.RwxInstruction,
	chown *pathinsfmt.Chown,
	location string,
) WithPermission

func NewWithPermissionRwxChownPtr added in v0.3.5

func NewWithPermissionRwxChownPtr(
	isNormalize,
	isExpandEnvVars bool,
	rwx *chmodins.RwxInstruction,
	chown *pathinsfmt.Chown,
	location string,
) *WithPermission

func (*WithPermission) Apply added in v0.3.5

func (it *WithPermission) Apply(
	isSkipOnInvalid bool,
) *errwrappers.Collection

func (*WithPermission) ApplyChown added in v0.3.5

func (it *WithPermission) ApplyChown() *errorwrapper.Wrapper

func (*WithPermission) ApplyPathVerifier added in v0.3.5

func (it *WithPermission) ApplyPathVerifier(
	isSkipOnInvalid bool,
	errorCollection *errwrappers.Collection,
) (isSuccess bool)

func (*WithPermission) ApplyPathVerifiers added in v0.3.5

func (it *WithPermission) ApplyPathVerifiers(
	errorCollection *errwrappers.Collection,
) (isSuccess bool)

func (*WithPermission) ApplyRwx added in v0.3.5

func (it *WithPermission) ApplyRwx() *errorwrapper.Wrapper

func (*WithPermission) ApplyUsingErrorCollection added in v0.3.5

func (it *WithPermission) ApplyUsingErrorCollection(
	isSkipOnInvalid bool,
	errorCollection *errwrappers.Collection,
) (isSuccess bool)

Jump to

Keyboard shortcuts

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