mkfs

package
v0.11.14 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: AGPL-3.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(a Artefact, in *gomkore.Project) (bool, error)

func Exts added in v0.11.14

func Exts(list ...string) exts

func SkipNames added in v0.11.14

func SkipNames(names ...string) skipNames

func SkipPaths added in v0.11.14

func SkipPaths(paths ...string) skipPaths

func Stat

func Stat(a Artefact, in *gomkore.Project) (fs.FileInfo, error)

Types

type All

type All []Filter

func (All) Hash added in v0.11.14

func (fs All) Hash(h hash.Hash)

func (All) Ok

func (fs All) Ok(p string, e fs.DirEntry) (bool, error)

type Any

type Any []Filter

func (Any) Hash added in v0.11.14

func (fs Any) Hash(h hash.Hash)

func (Any) Ok

func (fs Any) Ok(p string, e fs.DirEntry) (bool, error)

type Artefact

type Artefact interface {
	gomkore.RemovableArtefact
	Path() string
}

func Moved

func Moved(a Artefact, strip, dest Directory) (Artefact, error)

type Copy added in v0.11.14

type Copy struct {
	MkDirMode fs.FileMode
}

Copy [Operation] copies Artefact premises within the OS's filesystem to each of its results.

func (Copy) Describe added in v0.11.14

func (Copy) Describe(*gomkore.Action, *gomkore.Env) string

func (Copy) Do added in v0.11.14

func (cp Copy) Do(tr *gomkore.Trace, a *gomkore.Action, _ *gomkore.Env) error

func (Copy) WriteHash added in v0.11.14

func (cp Copy) WriteHash(h hash.Hash, a *gomkore.Action, _ *gomkore.Env) (bool, error)

type DirList

type DirList struct {
	Dir    string
	Filter Filter
}

func (DirList) Exists added in v0.11.13

func (d DirList) Exists(in *gomkore.Project) (bool, error)

func (DirList) Goals added in v0.11.14

func (d DirList) Goals(in *gomkore.Project) (gs []*gomkore.Goal, err error)

func (DirList) Key added in v0.11.14

func (d DirList) Key() any

func (DirList) List

func (d DirList) List(in *gomkore.Project) (ls []string, err error)

func (DirList) Moved

func (d DirList) Moved(strip, dest Directory) (DirList, error)

func (DirList) Name

func (d DirList) Name(prj *gomkore.Project) string

func (DirList) Path

func (d DirList) Path() string

func (DirList) Remove added in v0.11.13

func (d DirList) Remove(in *gomkore.Project) error

func (DirList) StateAt

func (d DirList) StateAt(in *gomkore.Project) (t time.Time, err error)

type DirTree

type DirTree struct {
	Dir    string
	Filter Filter
}

func DirFiles

func DirFiles(dir, match string, pathMax int) DirTree

func (DirTree) Exists added in v0.11.13

func (d DirTree) Exists(in *gomkore.Project) (bool, error)

func (DirTree) Goals added in v0.11.14

func (d DirTree) Goals(in *gomkore.Project) (gs []*gomkore.Goal, err error)

func (DirTree) Key added in v0.11.14

func (d DirTree) Key() any

func (DirTree) List

func (d DirTree) List(in *gomkore.Project) (ls []string, err error)

func (DirTree) Moved

func (d DirTree) Moved(strip, dest Directory) (DirTree, error)

func (DirTree) Name

func (d DirTree) Name(in *gomkore.Project) string

func (DirTree) Path

func (d DirTree) Path() string

func (DirTree) Remove added in v0.11.13

func (d DirTree) Remove(in *gomkore.Project) error

func (DirTree) StateAt

func (d DirTree) StateAt(in *gomkore.Project) (t time.Time, err error)

type Directory

type Directory interface {
	Artefact
	List(in *gomkore.Project) ([]string, error)
	// contains filtered or unexported methods
}

type File

type File string

func (File) Exists added in v0.11.13

func (f File) Exists(in *gomkore.Project) (bool, error)

func (File) Ext

func (f File) Ext() string

func (File) Key added in v0.11.14

func (f File) Key() any

func (File) Moved

func (f File) Moved(strip, dest Directory) (File, error)

func (File) Name

func (f File) Name(in *gomkore.Project) string

func (File) Path

func (f File) Path() string

func (File) Remove added in v0.11.13

func (f File) Remove(in *gomkore.Project) error

func (File) StateAt

func (f File) StateAt(in *gomkore.Project) (time.Time, error)

func (File) WithExt

func (f File) WithExt(ext string) File

type Filter

type Filter interface {
	Ok(path string, entry fs.DirEntry) (bool, error)
	Hash(f hash.Hash)
}

type FilterFunc

type FilterFunc func(string, fs.DirEntry) (bool, error)

func (FilterFunc) Hash added in v0.11.14

func (ff FilterFunc) Hash(h hash.Hash)

func (FilterFunc) Ok

func (ff FilterFunc) Ok(p string, e fs.DirEntry) (bool, error)

type IsDir

type IsDir bool

func (IsDir) Hash added in v0.11.14

func (d IsDir) Hash(h hash.Hash)

func (IsDir) Ok

func (d IsDir) Ok(_ string, e fs.DirEntry) (bool, error)

type MaxPathLen

type MaxPathLen int

func (MaxPathLen) Hash added in v0.11.14

func (fp MaxPathLen) Hash(h hash.Hash)

func (MaxPathLen) Ok

func (fp MaxPathLen) Ok(p string, _ fs.DirEntry) (bool, error)

type Mirror added in v0.11.14

type Mirror struct {
	Orig   Directory
	Strip  string
	Dest   Directory
	ExtMap map[string]string
}

func (Mirror) Exists added in v0.11.14

func (m Mirror) Exists(in *gomkore.Project) (bool, error)

func (Mirror) Key added in v0.11.14

func (m Mirror) Key() any

func (Mirror) List added in v0.11.14

func (m Mirror) List(in *gomkore.Project) (ls []string, err error)

func (Mirror) Name added in v0.11.14

func (m Mirror) Name(in *gomkore.Project) string

func (Mirror) Path added in v0.11.14

func (m Mirror) Path() string

func (Mirror) Remove added in v0.11.14

func (m Mirror) Remove(in *gomkore.Project) error

func (Mirror) StateAt added in v0.11.14

func (m Mirror) StateAt(in *gomkore.Project) (t time.Time, err error)

type MkDirs added in v0.11.14

type MkDirs struct {
	MkDirMode fs.FileMode
}

func (*MkDirs) Describe added in v0.11.14

func (md *MkDirs) Describe(actionHint *gomkore.Action, envHint *gomkore.Env) string

func (*MkDirs) Do added in v0.11.14

func (md *MkDirs) Do(tr *gomkore.Trace, a *gomkore.Action, env *gomkore.Env) error

func (*MkDirs) WriteHash added in v0.11.14

func (md *MkDirs) WriteHash(h hash.Hash, a *gomkore.Action, env *gomkore.Env) (bool, error)

type Mode

type Mode struct{ Any, All fs.FileMode }

func (Mode) Hash added in v0.11.14

func (fm Mode) Hash(h hash.Hash)

func (Mode) Ok

func (fm Mode) Ok(_ string, e fs.DirEntry) (bool, error)

type NameMatch

type NameMatch string

func (NameMatch) Hash added in v0.11.14

func (p NameMatch) Hash(h hash.Hash)

func (NameMatch) Ok

func (p NameMatch) Ok(_ string, e fs.DirEntry) (bool, error)

type Not

type Not struct{ Filter }

func (Not) Hash added in v0.11.14

func (fn Not) Hash(h hash.Hash)

func (Not) Ok added in v0.11.14

func (fn Not) Ok(p string, e fs.DirEntry) (bool, error)

Jump to

Keyboard shortcuts

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