wait

package
v4.10.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ErrNoMatchingFiles = Error("There are no matching files according to the provided suffix.")

Variables

This section is empty.

Functions

func ForMatchingPrefixOfLatestSuffix

func ForMatchingPrefixOfLatestSuffix(suffix string, prefixLen int,
	sourceDir, destDir string, timeLimit time.Duration) (string, string, error)

ForMatchingPrefixOfLatestSuffix waits the given timeLimit for both sourceDir and destDir to contain a file or directory with the given suffix that are both the most recent entry with the suffix in their respective dirs, and have the same prefix of the given length.

func UntilFileIsOld

func UntilFileIsOld(path string, age time.Duration) error

UntilFileIsOld waits for the file at the given path to be least age old.

The file's "age" is time since it's mtime. If the file is touched while we are waiting, we will wait more time.

Returns an error if the file doesn't exist.

Types

type Error

type Error string

func (Error) Error

func (e Error) Error() string

Jump to

Keyboard shortcuts

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