util

package
v0.0.0-...-55621af Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtomicWriteFile

func AtomicWriteFile(dst string, data []byte, perm os.FileMode, tmpDir string) error

AtomicWriteFile writes data to dst atomically by first writing to a temporary file in tmpDir, then renaming. This is safe for concurrent use across processes.

func Exec

func Exec(path string, args []string) error

func ExpandPath

func ExpandPath(path string) (string, error)

func IsDirExist

func IsDirExist(path string) (bool, error)

func IsNotDirectoryErr

func IsNotDirectoryErr(err error) bool

func IsRegularFileExist

func IsRegularFileExist(path string) (bool, error)

func MurmurHash

func MurmurHash(args ...string) string

func Sha512Checksum

func Sha512Checksum(data []byte) string

Types

type Metafile

type Metafile struct {
	// contains filtered or unexported fields
}

func NewMetafile

func NewMetafile(filePath string) Metafile

func (Metafile) Delete

func (f Metafile) Delete(locker lockgate.Locker) error

func (Metafile) HasBeenModifiedWithinPeriod

func (f Metafile) HasBeenModifiedWithinPeriod(locker lockgate.Locker, period time.Duration) (s bool, err error)

func (Metafile) Reset

func (f Metafile) Reset(locker lockgate.Locker) error

Jump to

Keyboard shortcuts

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