interfaces

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Snapshot

type Snapshot interface {
	Output() output.Output
	Date() time.Time
	Path() string
}

type Snapshots

type Snapshots interface {
	Snapshots() []Snapshot
	Outdated() []Snapshot
}

type Sys

type Sys interface {
	// Returns a generator of snapshots metadata.
	Snaps(path string) Snapshots

	// DelSnaps deletes outdated snapshots.
	DelSnaps([]Snapshot)

	// ModDate returns the date-time when a file was modified.
	ModDate(path string) (string, error)

	// DirExists returns true if a directory exists, and it is a directory.
	DirExists(path string) bool

	// FileExists returns true if path exists and points to a regular file.
	FileExists(path string) bool

	// MakeDir creates a directory unless it exists already.
	MakeDir(path string) error

	// DelDir deletes a directory.
	DelDir(path string) error

	// ClearDir output is an empty directory for the path. If a directory exists
	// it will clean it from files, if it does not exist, it will create it.
	ClearDir(path string) error
}

Jump to

Keyboard shortcuts

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