store

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Local

type Local struct {
	Root           string
	MinAge         time.Duration
	IncludeHidden  bool
	Include        []*regexp.Regexp
	Ignore         []*regexp.Regexp
	FollowSymlinks bool
	// contains filtered or unexported fields
}

Local implements sts.FileStore for local files

func (*Local) AddStandardIgnore

func (dir *Local) AddStandardIgnore()

AddStandardIgnore adds standard ignore patterns

func (*Local) GetOpener

func (dir *Local) GetOpener() sts.Open

GetOpener returns an Open function for reading

func (*Local) IsNotExist

func (dir *Local) IsNotExist(err error) bool

IsNotExist returns whether or not an error returned by Sync or Open indicates the file in question does not exist

func (*Local) Open

func (dir *Local) Open(origFile sts.File) (sts.Readable, error)

Open returns a readable for a local file instance

func (*Local) Remove

func (dir *Local) Remove(file sts.File) (err error)

Remove deletes the local file from disk

func (*Local) Scan

func (dir *Local) Scan(shouldAllow func(sts.File) bool) ([]sts.File, time.Time, error)

Scan reads the root directory tree and builds a list of files to be returned. A non-nil error will result in no files being returned.

func (*Local) Sync

func (dir *Local) Sync(origFile sts.File) (newFile sts.File, err error)

Sync checks to see if a file on disk has changed

Jump to

Keyboard shortcuts

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