files

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 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

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

func NewFile

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

func NewJsonFile

func NewJsonFile(contents interface{}) *File

func NewRawFile

func NewRawFile(contents string) *File

func (File) Ext

func (f File) Ext() string

func (File) Json

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

func (File) String

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

Jump to

Keyboard shortcuts

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