fs

package
v0.0.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyToFile

func ApplyToFile(path string, function FileFunc, filter FileNameFilter) error

func ApplyToFolder

func ApplyToFolder(folder string, recursive bool, function FileFunc, filter FileNameFilter) error

func ApplyToPathWithFilter

func ApplyToPathWithFilter(path string, recursive bool, function FileFunc, filter FileNameFilter) error

ApplyToPathWithFilter executes a 'FileFunc' function for each file in a given 'path'. If 'path' is a regular file itself 'FileFunc' will be applied to it directly without filtering. If 'path' is a folder, the function will be applied to each regular file inside the folder that matches the `FileNameFilter`. This behaviour can be made recursive by setting 'recursive' to true.

func IsYamlFilter

func IsYamlFilter(filename string) bool

Types

type FileFunc

type FileFunc func(filename string) error

type FileNameFilter

type FileNameFilter func(filename string) bool

Jump to

Keyboard shortcuts

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