paranoid

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsFingerprintMismatch

func IsFingerprintMismatch(err error) bool

func MtimeFromInfo

func MtimeFromInfo(info os.FileInfo) syscall.Timespec

func MtimeFromStat

func MtimeFromStat(stat *syscall.Stat_t) syscall.Timespec

Types

type File

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

func NewFile

func NewFile(name string) (File, error)

func NewFileFromInfo

func NewFileFromInfo(name string, info os.FileInfo) File

func (File) CacheKey

func (f File) CacheKey() []byte

func (File) Check

func (f File) Check() error

func (File) CheckFile

func (f File) CheckFile(file *os.File) error

func (File) Delete

func (f File) Delete() error

Remove a file only if it matches. Returns a non-nil error if the file exits and doesn't match, or if os.Remove fails for a non-NotExist reason.

func (File) Len

func (f File) Len() int64

func (File) Name

func (f File) Name() string

func (File) Open

func (f File) Open() (*os.File, error)

func (File) UnwrapCacheEntry

func (f File) UnwrapCacheEntry(cacheKey, cacheValue []byte) []byte

func (File) WrapCacheEntry

func (f File) WrapCacheEntry(data []byte) []byte

type FingerprintMismatch

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

func (FingerprintMismatch) Error

func (e FingerprintMismatch) Error() string

Jump to

Keyboard shortcuts

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