checksummer

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileRaw

func FileRaw(filePath string, v hashas.Variant) *errbyte.Results

func Md5

func Md5(filePath string) *errbyte.Results

func Sha1

func Sha1(filePath string) *errbyte.Results

func Sha256

func Sha256(filePath string) *errbyte.Results

func Sha512

func Sha512(filePath string) *errbyte.Results

Types

type Instance

type Instance struct {
	ErrorWrapper *errorwrapper.Wrapper
	// contains filtered or unexported fields
}

func Invalid

func Invalid(
	isRecursive bool,
	root string,
	hashType hashas.Variant,
	err error,
) *Instance

func New

func New(
	isAsync,
	isRecursive bool,
	root string,
	hashType hashas.Variant,
) *Instance

func NewAsync

func NewAsync(
	isRecursive bool,
	root string,
	hashType hashas.Variant,
) *Instance

func NewSync

func NewSync(
	isRecursive bool,
	root string,
	hashType hashas.Variant,
) *Instance

func (*Instance) ContainsMap

func (it *Instance) ContainsMap(other map[string][]byte) bool

func (*Instance) GetMap

func (it *Instance) GetMap() map[string][]byte

func (*Instance) HasError added in v0.6.1

func (it *Instance) HasError() bool

func (*Instance) HasHash

func (it *Instance) HasHash(filePath string) bool

func (*Instance) HasHashBytes

func (it *Instance) HasHashBytes(hashBytes []byte) bool

HasHashBytes Converts hashBytes to hexHashString then use it. HasHashString

func (*Instance) HasHashPath

func (it *Instance) HasHashPath(filePath string) bool

func (*Instance) HasHashString

func (it *Instance) HasHashString(hexHashString string) bool

func (*Instance) HashesHashset

func (it *Instance) HashesHashset() *corestr.Hashset

HashesHashset Key => HashString (Hex), Value => true

func (*Instance) IsDir

func (it *Instance) IsDir() bool

func (*Instance) IsEmpty

func (it *Instance) IsEmpty() bool

func (*Instance) IsEqual

func (it *Instance) IsEqual(isTrimRoot bool, other *Instance) bool

func (*Instance) IsFile

func (it *Instance) IsFile() bool

func (*Instance) IsHashMatch

func (it *Instance) IsHashMatch(filePath string, fileHash []byte) bool

func (*Instance) IsHashMatchString

func (it *Instance) IsHashMatchString(filePath, fileHash string) bool

func (*Instance) Length

func (it *Instance) Length() int

func (*Instance) RawSingleHash

func (it *Instance) RawSingleHash() []byte

RawSingleHash Single Bytes hash for all the hashes combined.

Runs lazy

func (*Instance) SingleHash

func (it *Instance) SingleHash() string

func (*Instance) StringHashes

func (it *Instance) StringHashes() *corestr.SimpleSlice

StringHashes all the hashes string slice

func (*Instance) StringHashesMap

func (it *Instance) StringHashesMap() map[string]string

StringHashesMap Key => Path, Value => HashString (Hex)

func (*Instance) StrippedPathMap

func (it *Instance) StrippedPathMap() map[string]string

StrippedPathMap Key => Root Stripped Path, Value => Actual Path

func (*Instance) VerifyError

func (it *Instance) VerifyError(
	isContinueOnErr bool,
	isTrimRoot bool,
	other *Instance,
) *errwrappers.Collection

Jump to

Keyboard shortcuts

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