files

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(srcPath, dstPath string) error

Copy is kept for retro-compatibility.

func CopyDir added in v1.5.0

func CopyDir(srcDir, dstDir string) error

CopyDir recursively copies a directory from source to destination.

func CopyFile added in v1.5.0

func CopyFile(srcPath, dstPath string) error

CopyFile copies a file from the source to the destination paths.

func ReadJSON

func ReadJSON(jsonPath string, data interface{}) error

ReadJSON reads a JSON file at the specified path into an interface.

func SaveJSON

func SaveJSON(jsonPath string, data interface{}) error

SaveJSON encodes an interface into JSON and saves it to a file.

func Zip

func Zip(srcPath, zipPath string) error

Zip creates a zip archive of the source folder/file at the specified path. Taken from: https://gist.github.com/svett/424e6784facc0ba907ae

Types

This section is empty.

Jump to

Keyboard shortcuts

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