filestate

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: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultHashMethod = hashas.DefaultFastHashMethod
)

Functions

func IsChecksumEqual

func IsChecksumEqual(
	isIgnoreCompareOnAnyEmpty bool,
	left, right string,
) bool

func IsEqual

func IsEqual(
	isIgnoreModifiedTimeCompare,
	isIgnoreChmodCompare,
	isIgnoreChownCompare,
	isIgnoreCompareOnAnyEmpty bool,
	left, right *Info,
) bool

func IsInfoChecksumEqual

func IsInfoChecksumEqual(
	isIgnoreCompareOnAnyEmpty bool,
	left, right *Info,
) bool

func IsNotEqual

func IsNotEqual(
	isIgnoreModifiedTimeCompare,
	isIgnoreChmodCompare,
	isIgnoreChownCompare,
	isIgnoreCompareOnAnyEmpty bool,
	left, right *Info,
) bool

Types

type CompiledCollectionModel

type CompiledCollectionModel struct {
	Collection       InfoCollection
	CompiledChecksum string
}

func NewCompiledCollectionModel

func NewCompiledCollectionModel(
	isSortChecksum bool,
	collection *InfoCollection,
) CompiledCollectionModel

func (*CompiledCollectionModel) AsJsonContractsBinder added in v0.5.3

func (it *CompiledCollectionModel) AsJsonContractsBinder() corejson.JsonContractsBinder

func (*CompiledCollectionModel) AsJsoner

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

func (*CompiledCollectionModel) HasCompiledChecksum

func (it *CompiledCollectionModel) HasCompiledChecksum() bool

func (*CompiledCollectionModel) IsEmpty

func (it *CompiledCollectionModel) IsEmpty() bool

func (*CompiledCollectionModel) IsEqual

func (it *CompiledCollectionModel) IsEqual(
	isCompareCollection bool,
	right *CompiledCollectionModel,
) bool

func (CompiledCollectionModel) Json

func (CompiledCollectionModel) JsonModelAny

func (it CompiledCollectionModel) JsonModelAny() interface{}

func (*CompiledCollectionModel) JsonParseSelfInject added in v0.5.3

func (it *CompiledCollectionModel) JsonParseSelfInject(jsonResult *corejson.Result) error

func (CompiledCollectionModel) JsonPtr

func (it CompiledCollectionModel) JsonPtr() *corejson.Result

func (CompiledCollectionModel) JsonString

func (it CompiledCollectionModel) JsonString() string

func (*CompiledCollectionModel) Length

func (it *CompiledCollectionModel) Length() int

type CompiledMappedItemsModel

type CompiledMappedItemsModel struct {
	MappedInfoItems  MappedInfoItems
	CompiledChecksum string
}

func NewCompiledMappedInfoItemsModel

func NewCompiledMappedInfoItemsModel(
	isSortChecksum bool,
	mappedItems *MappedInfoItems,
) CompiledMappedItemsModel

func NewCompiledMappedItemsModel

func NewCompiledMappedItemsModel(
	isSortChecksum bool,
	mappedItems map[string]*Info,
) CompiledMappedItemsModel

func (*CompiledMappedItemsModel) AsJsonContractsBinder added in v0.5.3

func (it *CompiledMappedItemsModel) AsJsonContractsBinder() corejson.JsonContractsBinder

func (*CompiledMappedItemsModel) AsJsoner

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

func (*CompiledMappedItemsModel) HasCompiledChecksum

func (it *CompiledMappedItemsModel) HasCompiledChecksum() bool

func (*CompiledMappedItemsModel) IsEmpty

func (it *CompiledMappedItemsModel) IsEmpty() bool

func (*CompiledMappedItemsModel) IsEqual

func (it *CompiledMappedItemsModel) IsEqual(
	isCompareCollection bool,
	right *CompiledMappedItemsModel,
) bool

func (CompiledMappedItemsModel) Json

func (CompiledMappedItemsModel) JsonModelAny

func (it CompiledMappedItemsModel) JsonModelAny() interface{}

func (*CompiledMappedItemsModel) JsonParseSelfInject added in v0.5.3

func (it *CompiledMappedItemsModel) JsonParseSelfInject(jsonResult *corejson.Result) error

func (CompiledMappedItemsModel) JsonPtr

func (CompiledMappedItemsModel) JsonString

func (it CompiledMappedItemsModel) JsonString() string

func (*CompiledMappedItemsModel) Length

func (it *CompiledMappedItemsModel) Length() int

type FilterFunc

type FilterFunc func(info *Info) (isTake, isBreak bool)

type HasFilterFunc

type HasFilterFunc func(index int, info *Info) (isSuccess bool)

type HasKeyFilterFunc

type HasKeyFilterFunc func(key string, info *Info) (isSuccess bool)

type Info

type Info struct {
	FullPath           string
	LastModified       time.Time
	Chmod              os.FileMode
	UserGroupId        *pathsysinfo.UserGroupId
	Size               int64
	HexContentChecksum string
	IsFile, IsInvalid  bool
	HashMethod         hashas.Variant
	// contains filtered or unexported fields
}

func InvalidInfo

func InvalidInfo(hashMethod hashas.Variant, filePath string) *Info

func NewInfo

func NewInfo(
	hashMethod hashas.Variant,
	isNormalize bool,
	filePath string,
) (*Info, *errorwrapper.Wrapper)

func NewInfoDefault

func NewInfoDefault(
	filePath string,
) (*Info, *errorwrapper.Wrapper)

func (*Info) AsJsonContractsBinder added in v0.5.3

func (it *Info) AsJsonContractsBinder() corejson.JsonContractsBinder

func (*Info) AsJsoner

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

func (*Info) ElitePath

func (it *Info) ElitePath() *elitepath.Path

func (*Info) IsChecksumEqualUsingInfo

func (it *Info) IsChecksumEqualUsingInfo(
	isIgnoreOnAnyEmpty bool,
	another *Info,
) bool

func (*Info) IsDir

func (it *Info) IsDir() bool

func (*Info) IsDirExist

func (it *Info) IsDirExist() bool

func (*Info) IsEqual

func (it *Info) IsEqual(
	isIgnoreModifiedTimeCompare,
	isIgnoreChmodCompare,
	isIgnoreChownCompare,
	isIgnoreCompareOnAnyEmpty bool,
	right *Info,
) bool

func (*Info) IsEqualDefault

func (it *Info) IsEqualDefault(
	right *Info,
) bool

func (*Info) IsExist

func (it *Info) IsExist() bool

func (*Info) IsFileExist

func (it *Info) IsFileExist() bool

func (*Info) IsLastModifiedEqual

func (it *Info) IsLastModifiedEqual(right *Info) bool

func (*Info) IsNotNull

func (it *Info) IsNotNull() bool

func (*Info) IsNull

func (it *Info) IsNull() bool

func (Info) Json

func (it Info) Json() corejson.Result

func (Info) JsonModelAny

func (it Info) JsonModelAny() interface{}

func (*Info) JsonParseSelfInject added in v0.5.3

func (it *Info) JsonParseSelfInject(jsonResult *corejson.Result) error

func (Info) JsonPtr

func (it Info) JsonPtr() *corejson.Result

func (Info) JsonString

func (it Info) JsonString() string

func (*Info) LastModifiedPtr

func (it *Info) LastModifiedPtr() *time.Time

func (*Info) LocationInfo

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

func (*Info) ReadCurrentHexChecksum

func (it *Info) ReadCurrentHexChecksum() *errstr.Result

func (*Info) ReadCurrentHexChecksumString

func (it *Info) ReadCurrentHexChecksumString() string

func (*Info) ReadCurrentRawChecksum

func (it *Info) ReadCurrentRawChecksum() *errbyte.Results

func (*Info) RwxWrapper

func (it *Info) RwxWrapper() *chmodhelper.RwxWrapper

func (*Info) SizePtr

func (it *Info) SizePtr() *int64

func (*Info) Stat

func (it *Info) Stat() *chmodhelper.PathExistStat

func (*Info) String

func (it *Info) String() string

type InfoCollection

type InfoCollection struct {
	Items []*Info `json:"Items,omitempty"`
}

func EmptyInfoCollection

func EmptyInfoCollection() *InfoCollection

func NewInfoCollection

func NewInfoCollection(capacity int) *InfoCollection

func NewInfoCollectionUsingFilePathsAsync

func NewInfoCollectionUsingFilePathsAsync(
	hashMethod hashas.Variant,
	isNormalize bool,
	filePaths ...string,
) (*InfoCollection, *errwrappers.Collection)

func NewInfoCollectionUsingInfoItems

func NewInfoCollectionUsingInfoItems(
	infoItems ...*Info,
) *InfoCollection

func (*InfoCollection) Add

func (it *InfoCollection) Add(
	stateInfo *Info,
) *InfoCollection

func (*InfoCollection) AddDirsPtr

func (it *InfoCollection) AddDirsPtr(
	isSkipOnIssues bool,
	infoItems ...*Info,
) *InfoCollection

func (*InfoCollection) AddFilesPtr

func (it *InfoCollection) AddFilesPtr(
	isSkipOnIssues bool,
	infoItems ...*Info,
) *InfoCollection

func (*InfoCollection) Adds

func (it *InfoCollection) Adds(
	infoItems ...*Info,
) *InfoCollection

func (*InfoCollection) AddsIf

func (it *InfoCollection) AddsIf(
	isAdd bool,
	infoItems ...*Info,
) *InfoCollection

func (*InfoCollection) AddsPtr

func (it *InfoCollection) AddsPtr(
	isSkipOnIssues bool,
	infoItems ...*Info,
) *InfoCollection

func (*InfoCollection) AllChecksums

func (it *InfoCollection) AllChecksums() []string

func (*InfoCollection) AllChecksumsSorted

func (it *InfoCollection) AllChecksumsSorted() []string

func (*InfoCollection) AllFilePathToHexChecksumMap

func (it *InfoCollection) AllFilePathToHexChecksumMap() map[string]string

AllFilePathToHexChecksumMap

Key = filePath,

Value = hex-checksum

func (*InfoCollection) AllFilePathToInfoMap

func (it *InfoCollection) AllFilePathToInfoMap() map[string]*Info

AllFilePathToInfoMap

Key = filePath,

Value = Info

func (*InfoCollection) AllFilePaths

func (it *InfoCollection) AllFilePaths() []string

func (*InfoCollection) AllFilePathsSorted

func (it *InfoCollection) AllFilePathsSorted() []string

func (*InfoCollection) AllHexChecksumToFilePathMap

func (it *InfoCollection) AllHexChecksumToFilePathMap() map[string]string

AllHexChecksumToFilePathMap

Key = HexChecksum,

Value = FilePath

func (*InfoCollection) AllHexChecksumToInfoMap

func (it *InfoCollection) AllHexChecksumToInfoMap() map[string]*Info

AllHexChecksumToInfoMap

Key = HexChecksum,

Value = Info

func (*InfoCollection) AsJsonContractsBinder added in v0.5.3

func (it *InfoCollection) AsJsonContractsBinder() corejson.JsonContractsBinder

func (*InfoCollection) AsJsonParseSelfInjector

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

func (*InfoCollection) AsJsoner

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

func (*InfoCollection) CleanupNonNull

func (it *InfoCollection) CleanupNonNull() *InfoCollection

func (*InfoCollection) Clear

func (it *InfoCollection) Clear() *InfoCollection

func (InfoCollection) Clone

func (it InfoCollection) Clone() InfoCollection

func (*InfoCollection) ClonePtr

func (it *InfoCollection) ClonePtr() *InfoCollection

func (*InfoCollection) CompiledChecksum

func (it *InfoCollection) CompiledChecksum(isSortChecksum bool) *errstr.Result

func (*InfoCollection) CompiledChecksumString

func (it *InfoCollection) CompiledChecksumString(isSortChecksum bool) string

func (*InfoCollection) CompiledCollectionModel

func (it *InfoCollection) CompiledCollectionModel(isSortChecksum bool) CompiledCollectionModel

func (*InfoCollection) ConcatNew

func (it *InfoCollection) ConcatNew(
	additionalInfoItems ...*Info,
) *InfoCollection

func (*InfoCollection) ConcatNewPtr

func (it *InfoCollection) ConcatNewPtr(
	additionalInfoItems ...*Info,
) *InfoCollection

func (*InfoCollection) Count

func (it *InfoCollection) Count() int

func (*InfoCollection) CsvStrings

func (it *InfoCollection) CsvStrings() []string

func (*InfoCollection) Dispose

func (it *InfoCollection) Dispose()

func (*InfoCollection) Filter

func (it *InfoCollection) Filter(
	filterFunc FilterFunc,
) []*Info

func (*InfoCollection) FilterExtInfoCollection

func (it *InfoCollection) FilterExtInfoCollection(
	dotExtension string,
) *InfoCollection

func (*InfoCollection) FilterInfoCollection

func (it *InfoCollection) FilterInfoCollection(
	filterFunc FilterFunc,
) *InfoCollection

func (*InfoCollection) FilterWithLimit

func (it *InfoCollection) FilterWithLimit(
	limit int,
	filterFunc FilterFunc,
) []*Info

func (*InfoCollection) First

func (it *InfoCollection) First() *Info

func (*InfoCollection) FirstDynamic

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

func (*InfoCollection) FirstOrDefault

func (it *InfoCollection) FirstOrDefault() *Info

func (*InfoCollection) FirstOrDefaultDynamic

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

func (*InfoCollection) GetAllUsingChecksumCollection

func (it *InfoCollection) GetAllUsingChecksumCollection(
	findingHexChecksums ...string,
) *InfoCollection

func (*InfoCollection) GetPagedCollection

func (it *InfoCollection) GetPagedCollection(
	eachPageSize int,
) []*InfoCollection

func (*InfoCollection) GetPagesSize

func (it *InfoCollection) GetPagesSize(
	eachPageSize int,
) int

func (*InfoCollection) GetSinglePageCollection

func (it *InfoCollection) GetSinglePageCollection(
	eachPageSize int,
	pageIndex int,
) *InfoCollection

GetSinglePageCollection PageIndex is one based index. Should be above or equal 1

func (*InfoCollection) HasAllChecksum

func (it *InfoCollection) HasAllChecksum(hexChecksums ...string) bool

func (*InfoCollection) HasAnyChecksum

func (it *InfoCollection) HasAnyChecksum(hexChecksums ...string) bool

func (*InfoCollection) HasAnyFilePath

func (it *InfoCollection) HasAnyFilePath(filePath ...string) bool

func (*InfoCollection) HasAnyItem

func (it *InfoCollection) HasAnyItem() bool

func (*InfoCollection) HasChecksum

func (it *InfoCollection) HasChecksum(hexChecksum string) bool

func (*InfoCollection) HasFilterFuncAsync

func (it *InfoCollection) HasFilterFuncAsync(
	hasFilterFunc HasFilterFunc,
) (isSuccess bool)

func (*InfoCollection) HasIndex

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

func (*InfoCollection) InfoUsingChecksums

func (it *InfoCollection) InfoUsingChecksums(checksums ...string) *InfoCollection

func (*InfoCollection) InfoUsingFilePaths

func (it *InfoCollection) InfoUsingFilePaths(filePaths ...string) *InfoCollection

func (*InfoCollection) InsertAt

func (it *InfoCollection) InsertAt(index int, item *Info) *InfoCollection

func (*InfoCollection) IsEmpty

func (it *InfoCollection) IsEmpty() bool

func (*InfoCollection) IsEqual

func (it *InfoCollection) IsEqual(
	isIgnoreModifiedTimeCompare,
	isIgnoreChmodCompare,
	isIgnoreChownCompare,
	isIgnoreCompareOnAnyEmpty bool,
	another *InfoCollection,
) bool

func (*InfoCollection) IsEqualDefault

func (it *InfoCollection) IsEqualDefault(
	another *InfoCollection,
) bool

func (*InfoCollection) IsEqualItems

func (it *InfoCollection) IsEqualItems(
	isIgnoreModifiedTimeCompare,
	isIgnoreChmodCompare,
	isIgnoreChownCompare,
	isIgnoreCompareOnAnyEmpty bool,
	lines ...*Info,
) bool

func (*InfoCollection) Join

func (it *InfoCollection) Join(joiner string) string

func (*InfoCollection) JoinCsv

func (it *InfoCollection) JoinCsv() string

func (*InfoCollection) JoinCsvLine

func (it *InfoCollection) JoinCsvLine() string

func (*InfoCollection) JoinJsonStrings

func (it *InfoCollection) JoinJsonStrings(joiner string) string

func (*InfoCollection) JoinLine

func (it *InfoCollection) JoinLine() string

func (InfoCollection) Json

func (it InfoCollection) Json() corejson.Result

func (*InfoCollection) JsonModel

func (it *InfoCollection) JsonModel() []*Info

func (*InfoCollection) JsonModelAny

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

func (*InfoCollection) JsonParseSelfInject

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

func (InfoCollection) JsonPtr

func (it InfoCollection) JsonPtr() *corejson.Result

func (*InfoCollection) JsonString

func (it *InfoCollection) JsonString() string

func (*InfoCollection) JsonStrings

func (it *InfoCollection) JsonStrings() []string

func (*InfoCollection) KeyStringValueInfoMapUsingFmtFunc added in v0.5.3

func (it *InfoCollection) KeyStringValueInfoMapUsingFmtFunc(
	fmtFunc MapKeyValInfoFmtFunc,
) map[string]*Info

func (*InfoCollection) KeyValueStringMapUsingFmtFunc added in v0.5.3

func (it *InfoCollection) KeyValueStringMapUsingFmtFunc(
	fmtFunc MapKeyValFmtFunc,
) map[string]string

func (*InfoCollection) Last

func (it *InfoCollection) Last() *Info

func (*InfoCollection) LastDynamic

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

func (*InfoCollection) LastIndex

func (it *InfoCollection) LastIndex() int

func (*InfoCollection) LastOrDefault

func (it *InfoCollection) LastOrDefault() *Info

func (*InfoCollection) LastOrDefaultDynamic

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

func (*InfoCollection) Length

func (it *InfoCollection) Length() int

func (*InfoCollection) Limit

func (it *InfoCollection) Limit(limit int) []*Info

func (*InfoCollection) LimitCollection

func (it *InfoCollection) LimitCollection(limit int) *InfoCollection

func (*InfoCollection) LimitDynamic

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

func (*InfoCollection) New

func (it *InfoCollection) New(
	isNormalize,
	isSortedFilePaths bool,
) (*InfoCollection, *errwrappers.Collection)

func (*InfoCollection) ParseInjectUsingJson

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

func (*InfoCollection) ParseInjectUsingJsonMust

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

ParseInjectUsingJsonMust Panic if error

func (*InfoCollection) PathStatSlice added in v0.5.3

func (it *InfoCollection) PathStatSlice(isTakeOnlyValid bool) []*chmodhelper.PathExistStat

func (*InfoCollection) ReadCurrentHexChecksumsMapStrings

func (it *InfoCollection) ReadCurrentHexChecksumsMapStrings() map[string]string

ReadCurrentHexChecksumsMapStrings

Key => FilePath

Value => HexChecksum

func (*InfoCollection) ReadCurrentHexChecksumsStrings

func (it *InfoCollection) ReadCurrentHexChecksumsStrings() []string

func (*InfoCollection) Reverse

func (it *InfoCollection) Reverse() *InfoCollection

func (*InfoCollection) SafeLimitCollection

func (it *InfoCollection) SafeLimitCollection(limit int) *InfoCollection

func (*InfoCollection) Skip

func (it *InfoCollection) Skip(skippingItemsCount int) []*Info

func (*InfoCollection) SkipCollection

func (it *InfoCollection) SkipCollection(skippingItemsCount int) *InfoCollection

func (*InfoCollection) SkipDynamic

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

func (InfoCollection) String

func (it InfoCollection) String() string

func (*InfoCollection) Strings

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

func (*InfoCollection) StringsUsingStringerFmtFunc

func (it *InfoCollection) StringsUsingStringerFmtFunc(
	fmtFunc StringerFmtFunc,
) []string

func (*InfoCollection) Take

func (it *InfoCollection) Take(takeDynamicItems int) []*Info

func (*InfoCollection) TakeAllFilter

func (it *InfoCollection) TakeAllFilter(
	limit int,
	filterFunc TakeAllFilterFunc,
) []*Info

func (*InfoCollection) TakeAllFilterCollection

func (it *InfoCollection) TakeAllFilterCollection(
	limit int,
	filterFunc TakeAllFilterFunc,
) *InfoCollection

func (*InfoCollection) TakeCollection

func (it *InfoCollection) TakeCollection(takeDynamicItems int) *InfoCollection

func (*InfoCollection) TakeDynamic

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

type MapKeyValFmtFunc added in v0.5.3

type MapKeyValFmtFunc func(info *Info) (key, value string)

type MapKeyValInfoFmtFunc added in v0.5.3

type MapKeyValInfoFmtFunc func(info *Info) (key string)

type MappedInfoItems

type MappedInfoItems struct {
	Items map[string]*Info `json:"MapItems,omitempty"` // Key path
}

MappedInfoItems

Key path

func EmptyMappedInfoItems

func EmptyMappedInfoItems() *MappedInfoItems

func NewMappedInfoItems

func NewMappedInfoItems(capacity int) *MappedInfoItems

func NewMappedInfoItemsUsingFilePaths

func NewMappedInfoItemsUsingFilePaths(
	hashMethod hashas.Variant,
	isNormalize bool,
	filePaths ...string,
) (*MappedInfoItems, *errwrappers.Collection)

func NewMappedInfoItemsUsingInfoItems

func NewMappedInfoItemsUsingInfoItems(
	infoItems ...*Info,
) *MappedInfoItems

func (*MappedInfoItems) Add

func (it *MappedInfoItems) Add(
	stateInfo *Info,
) *MappedInfoItems

func (*MappedInfoItems) AddDirsPtr

func (it *MappedInfoItems) AddDirsPtr(
	isSkipOnIssues bool,
	infoItems ...*Info,
) *MappedInfoItems

func (*MappedInfoItems) AddFilesPtr

func (it *MappedInfoItems) AddFilesPtr(
	isSkipOnIssues bool,
	infoItems ...*Info,
) *MappedInfoItems

func (*MappedInfoItems) AddMapCollection

func (it *MappedInfoItems) AddMapCollection(
	mapCollection *MappedInfoItems,
) *MappedInfoItems

func (*MappedInfoItems) AddMapItems

func (it *MappedInfoItems) AddMapItems(
	infoMapItems map[string]*Info,
) *MappedInfoItems

func (*MappedInfoItems) Adds

func (it *MappedInfoItems) Adds(
	infoItems ...*Info,
) *MappedInfoItems

func (*MappedInfoItems) AddsIf

func (it *MappedInfoItems) AddsIf(
	isAdd bool,
	infoItems ...*Info,
) *MappedInfoItems

func (*MappedInfoItems) AddsPtr

func (it *MappedInfoItems) AddsPtr(
	isSkipOnIssues bool,
	infoItems ...*Info,
) *MappedInfoItems

func (*MappedInfoItems) AllChecksums

func (it *MappedInfoItems) AllChecksums() []string

func (*MappedInfoItems) AllChecksumsSorted

func (it *MappedInfoItems) AllChecksumsSorted() []string

func (*MappedInfoItems) AllFilePathToHexChecksumMap

func (it *MappedInfoItems) AllFilePathToHexChecksumMap() map[string]string

AllFilePathToHexChecksumMap

Key = filePath,

Value = hex-checksum

func (*MappedInfoItems) AllFilePathToInfoMap

func (it *MappedInfoItems) AllFilePathToInfoMap() map[string]*Info

AllFilePathToInfoMap

Key = filePath,

Value = Info

func (*MappedInfoItems) AllFilteredInfoItemsByFilePaths

func (it *MappedInfoItems) AllFilteredInfoItemsByFilePaths(
	filePaths ...string,
) *InfoCollection

func (*MappedInfoItems) AllHexChecksumToFilePathMap

func (it *MappedInfoItems) AllHexChecksumToFilePathMap() map[string]string

AllHexChecksumToFilePathMap

Key = HexChecksum,

Value = FilePath

func (*MappedInfoItems) AllHexChecksumToInfoMap

func (it *MappedInfoItems) AllHexChecksumToInfoMap() map[string]*Info

AllHexChecksumToInfoMap

Key = HexChecksum,

Value = Info

func (*MappedInfoItems) AllKeys

func (it *MappedInfoItems) AllKeys() []string

func (*MappedInfoItems) AllKeysSorted

func (it *MappedInfoItems) AllKeysSorted() []string

func (*MappedInfoItems) AsJsonContractsBinder added in v0.5.3

func (it *MappedInfoItems) AsJsonContractsBinder() corejson.JsonContractsBinder

func (*MappedInfoItems) AsJsonParseSelfInjector

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

func (*MappedInfoItems) AsJsoner

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

func (*MappedInfoItems) CleanupNonNull

func (it *MappedInfoItems) CleanupNonNull() *MappedInfoItems

func (*MappedInfoItems) Clear

func (it *MappedInfoItems) Clear() *MappedInfoItems

func (MappedInfoItems) Clone

func (it MappedInfoItems) Clone() MappedInfoItems

func (*MappedInfoItems) ClonePtr

func (it *MappedInfoItems) ClonePtr() *MappedInfoItems

func (*MappedInfoItems) CompiledChecksum

func (it *MappedInfoItems) CompiledChecksum(isSortChecksum bool) *errstr.Result

func (*MappedInfoItems) CompiledChecksumString

func (it *MappedInfoItems) CompiledChecksumString(isSortChecksum bool) string

func (*MappedInfoItems) CompiledCollectionModel

func (it *MappedInfoItems) CompiledCollectionModel(isSortChecksum bool) CompiledMappedItemsModel

func (*MappedInfoItems) ConcatNew

func (it *MappedInfoItems) ConcatNew(
	additionalInfoItems ...*Info,
) *MappedInfoItems

func (*MappedInfoItems) ConcatNewPtr

func (it *MappedInfoItems) ConcatNewPtr(
	additionalInfoItems ...*Info,
) *MappedInfoItems

func (*MappedInfoItems) Count

func (it *MappedInfoItems) Count() int

func (*MappedInfoItems) Dispose

func (it *MappedInfoItems) Dispose()

func (*MappedInfoItems) Filter

func (it *MappedInfoItems) Filter(
	filterFunc FilterFunc,
) []*Info

func (*MappedInfoItems) FilterExtMappedInfoItems

func (it *MappedInfoItems) FilterExtMappedInfoItems(
	dotExtension string,
) *MappedInfoItems

func (*MappedInfoItems) FilterMappedInfoItems

func (it *MappedInfoItems) FilterMappedInfoItems(
	filterFunc FilterFunc,
) *MappedInfoItems

func (*MappedInfoItems) FilterWithLimit

func (it *MappedInfoItems) FilterWithLimit(
	limit int,
	filterFunc FilterFunc,
) []*Info

func (*MappedInfoItems) GetInfoByFilePath

func (it *MappedInfoItems) GetInfoByFilePath(
	filePath string,
) *Info

func (*MappedInfoItems) GetPagedCollection

func (it *MappedInfoItems) GetPagedCollection(
	eachPageSize int,
) []*MappedInfoItems

func (*MappedInfoItems) GetPagesSize

func (it *MappedInfoItems) GetPagesSize(
	eachPageSize int,
) int

func (*MappedInfoItems) GetSinglePageCollection

func (it *MappedInfoItems) GetSinglePageCollection(
	eachPageSize int,
	pageIndex int,
	allKeys []string,
) *MappedInfoItems

GetSinglePageCollection PageIndex is one based index. Should be above or equal 1

func (*MappedInfoItems) HasAllFilePath

func (it *MappedInfoItems) HasAllFilePath(filePaths ...string) bool

func (*MappedInfoItems) HasAnyChecksum

func (it *MappedInfoItems) HasAnyChecksum(hexChecksums ...string) bool

func (*MappedInfoItems) HasAnyFilePath

func (it *MappedInfoItems) HasAnyFilePath(filePaths ...string) bool

func (*MappedInfoItems) HasAnyItem

func (it *MappedInfoItems) HasAnyItem() bool

func (*MappedInfoItems) HasChecksum

func (it *MappedInfoItems) HasChecksum(hexChecksum string) bool

func (*MappedInfoItems) HasFilterFuncAsync

func (it *MappedInfoItems) HasFilterFuncAsync(
	hasFilterFunc HasKeyFilterFunc,
) (isSuccess bool)

func (*MappedInfoItems) HasIndex

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

func (*MappedInfoItems) InfoUsingChecksums

func (it *MappedInfoItems) InfoUsingChecksums(checksums ...string) *InfoCollection

func (*MappedInfoItems) InfoUsingFilePaths

func (it *MappedInfoItems) InfoUsingFilePaths(filePaths ...string) *InfoCollection

func (*MappedInfoItems) IsEmpty

func (it *MappedInfoItems) IsEmpty() bool

func (*MappedInfoItems) IsEqual

func (it *MappedInfoItems) IsEqual(
	isIgnoreModifiedTimeCompare,
	isIgnoreChmodCompare,
	isIgnoreChownCompare,
	isIgnoreCompareOnAnyEmpty bool,
	another *MappedInfoItems,
) bool

func (*MappedInfoItems) IsEqualDefault

func (it *MappedInfoItems) IsEqualDefault(
	another *MappedInfoItems,
) bool

func (*MappedInfoItems) IsEqualItems

func (it *MappedInfoItems) IsEqualItems(
	isIgnoreModifiedTimeCompare,
	isIgnoreChmodCompare,
	isIgnoreChownCompare,
	isIgnoreCompareOnAnyEmpty bool,
	itemsMap map[string]*Info,
) bool

func (*MappedInfoItems) Join

func (it *MappedInfoItems) Join(joiner string) string

func (*MappedInfoItems) JoinJsonStrings

func (it *MappedInfoItems) JoinJsonStrings(joiner string) string

func (*MappedInfoItems) JoinLine

func (it *MappedInfoItems) JoinLine() string

func (MappedInfoItems) Json

func (it MappedInfoItems) Json() corejson.Result

func (*MappedInfoItems) JsonModel

func (it *MappedInfoItems) JsonModel() map[string]*Info

func (*MappedInfoItems) JsonModelAny

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

func (*MappedInfoItems) JsonParseSelfInject

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

func (MappedInfoItems) JsonPtr

func (it MappedInfoItems) JsonPtr() *corejson.Result

func (*MappedInfoItems) JsonString

func (it *MappedInfoItems) JsonString() string

func (*MappedInfoItems) JsonStrings

func (it *MappedInfoItems) JsonStrings() []string

func (*MappedInfoItems) KeyStringValueInfoMapUsingFmtFunc added in v0.5.3

func (it *MappedInfoItems) KeyStringValueInfoMapUsingFmtFunc(
	fmtFunc MapKeyValInfoFmtFunc,
) map[string]*Info

func (*MappedInfoItems) KeyValueStringMapUsingFmtFunc added in v0.5.3

func (it *MappedInfoItems) KeyValueStringMapUsingFmtFunc(
	fmtFunc MapKeyValFmtFunc,
) map[string]string

func (*MappedInfoItems) LastIndex

func (it *MappedInfoItems) LastIndex() int

func (*MappedInfoItems) Length

func (it *MappedInfoItems) Length() int

func (*MappedInfoItems) MappedInfoItemsByKeys

func (it *MappedInfoItems) MappedInfoItemsByKeys(keys ...string) *MappedInfoItems

func (*MappedInfoItems) ParseInjectUsingJson

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

func (*MappedInfoItems) ParseInjectUsingJsonMust

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

ParseInjectUsingJsonMust Panic if error

func (*MappedInfoItems) PathStatSlice added in v0.5.3

func (it *MappedInfoItems) PathStatSlice(isTakeOnlyValid bool) []*chmodhelper.PathExistStat

func (MappedInfoItems) String

func (it MappedInfoItems) String() string

func (*MappedInfoItems) Strings

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

func (*MappedInfoItems) StringsUsingStringerFmtFunc

func (it *MappedInfoItems) StringsUsingStringerFmtFunc(
	fmtFunc StringerFmtFunc,
) []string

func (*MappedInfoItems) TakeAllFilter

func (it *MappedInfoItems) TakeAllFilter(
	limit int,
	filterFunc TakeAllFilterFunc,
) []*Info

func (*MappedInfoItems) TakeAllFilterCollection

func (it *MappedInfoItems) TakeAllFilterCollection(
	limit int,
	filterFunc TakeAllFilterFunc,
) *InfoCollection

func (*MappedInfoItems) TakeAllFilterMapCollection

func (it *MappedInfoItems) TakeAllFilterMapCollection(
	limit int,
	filterFunc TakeAllFilterFunc,
) *MappedInfoItems

type StringerFmtFunc

type StringerFmtFunc func(index int, info *Info) string

type TakeAllFilterFunc

type TakeAllFilterFunc func(info *Info) (isTake bool)

Jump to

Keyboard shortcuts

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