filesnap

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone(src map[string]Snapshot) map[string]Snapshot

Clone returns an independent copy of the supplied snapshot map.

func Equal

func Equal(left, right map[string]Snapshot) bool

Equal reports whether both snapshot maps contain the same keys and metadata.

Types

type Snapshot

type Snapshot struct {
	ModTime time.Time
	Size    int64
	// contains filtered or unexported fields
}

Snapshot records the filesystem metadata used to detect staleness.

func FromInfo

func FromInfo(path string, info fs.FileInfo) Snapshot

FromInfo captures supplied metadata, fingerprinting content only when the OS lacks a reliable change token.

func FromPath

func FromPath(path string) (Snapshot, error)

FromPath captures current file metadata and a content fingerprint when OS change metadata is unavailable.

func (Snapshot) Equal

func (s Snapshot) Equal(other Snapshot) bool

Equal requires matching captured changes or matching metadata for two synthetic snapshots.

Jump to

Keyboard shortcuts

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