fileset

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidBasepath = errors.New("basepath must be an existing directory")

Functions

This section is empty.

Types

type Fileset

type Fileset struct {
	Paths    map[string]os.FileInfo
	Basepath string
}

Fileset stores a set of file paths and maps them to according os.FileInfo

func New

func New(basepath string) (*Fileset, error)

New returns a new Fileset with only the basepath specified

func (*Fileset) Contains

func (fm *Fileset) Contains(path string) bool

Contains is a helper to test set membership

func (*Fileset) Populate

func (fs *Fileset) Populate() error

Populate walks the basepath of the Fileset to populate the paths map

func (*Fileset) SftpPopulate added in v0.0.13

func (fs *Fileset) SftpPopulate(sc *sftp.Client) error

SftpPopulate populates a fileset from an sftp client

func (*Fileset) String

func (fs *Fileset) String() string

Jump to

Keyboard shortcuts

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