state

package
v0.5.4-0...-121c8a9 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Path string

Path is the location of the serialized system state directory

Functions

This section is empty.

Types

type Map

type Map map[string]time.Time

Map contains a list files and their modification times

func Load

func Load() (Map, error)

Load reads in the state if it exists and deserializes it

func Scan

func Scan(filters []string) (m Map, err error)

Scan goes over a set of paths and imports them and their contents to the map

func (Map) Diff

func (m Map) Diff(curr Map) Map

Diff finds all of the Files which were modified or deleted between states

func (Map) Exclude

func (m Map) Exclude(patterns []string) Map

Exclude removes keys from the Map if they match certain patterns

func (Map) IsEmpty

func (m Map) IsEmpty() bool

IsEmpty checkes if the Map has nothing in it

func (Map) Merge

func (m Map) Merge(other Map)

Merge combines two Maps into one

func (Map) Save

func (m Map) Save() error

Save writes out the current state for future runs

func (Map) Search

func (m Map) Search(paths []string) Map

Search finds all of the matching files in a Map

func (Map) Strings

func (m Map) Strings() (strs []string)

Strings gets a list of files from the keys

Jump to

Keyboard shortcuts

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