files

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Json = "json"
	Raw  = "raw"
)

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(sourceDirectory, targetDirectory string, skipFiles []string) fs.WalkDirFunc

CopyDir should be used in conjunction with filepath.WalkDir to recursively copy all the files within sourceDirectory into targetDirectory.

Any file names in skipFiles will be skipped.

Types

type File added in v0.2.0

type File struct {
	// contains filtered or unexported fields
}

func NewFile added in v0.2.0

func NewFile(file string, contents []byte) (*File, error)

func NewJsonFile added in v0.2.0

func NewJsonFile(contents interface{}) *File

func NewRawFile added in v0.2.0

func NewRawFile(contents string) *File

func (File) Ext added in v0.2.0

func (f File) Ext() string

func (File) Json added in v0.2.0

func (f File) Json() (interface{}, bool)

func (File) String added in v0.2.0

func (f File) String() (string, bool)

Jump to

Keyboard shortcuts

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