fs

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package fs provides filesystem related functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyAll added in v0.4.3

func CopyAll(dstdir, srcdir string) error

CopyAll copies all files from dstdir into srcdir.

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.

func ListTerramateDirs

func ListTerramateDirs(dir string) ([]string, error)

ListTerramateDirs lists Terramate dirs, which are any dirs except ones starting with ".".

func ListTerramateFiles

func ListTerramateFiles(dir string) (filenames []string, err error)

ListTerramateFiles returns a list of terramate related files from the directory dir.

Types

type CopyFilterFunc

type CopyFilterFunc func(path string, entry os.DirEntry) bool

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.

Jump to

Keyboard shortcuts

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