Documentation
¶
Overview ¶
Package fs provides filesystem related functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDir ¶
func CopyDir(destdir, srcdir string, filter CopyFilterFunc) error
CopyDir will copy srcdir to destdir. It will copy all dirs and files recursively. The destdir provided does not need to exist, it will be created. The provided filter function allows to filter which files/directories get copied.
Types ¶
type CopyFilterFunc ¶
CopyFilterFunc filters which files/dirs will be copied by CopyDir. If the function returns true, the file/dir is copied. If it returns false, the file/dir is ignored.
type ListResult ¶ added in v0.11.2
type ListResult struct {
TmFiles []string
TmGenFiles []string
OtherFiles []string
Dirs []string
Skipped []string
}
ListResult contains the result of listing a directory.
func ListTerramateFiles ¶
func ListTerramateFiles(dir string) (ListResult, error)
ListTerramateFiles returns the entries of directory separated (terramate files, others and directories)
func (*ListResult) AddDir ¶ added in v0.13.1
func (r *ListResult) AddDir(name string)
AddDir adds a directory to the ListResult. It classifies the directory accordingly.
func (*ListResult) AddFile ¶ added in v0.13.1
func (r *ListResult) AddFile(name string)
AddFile adds a file to the ListResult. It classifies the file accordingly.