fs

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const PathNotFoundMsg = `could not read the "%s" file`

Variables

This section is empty.

Functions

func CreateFile

func CreateFile(path string) (file *os.File, err error)

CreateFile - creates a new file.

func DeleteDir added in v0.0.8

func DeleteDir(path string) (err error)

DeleteDir - deletes the directory and all sub-directories and files.

func DeleteFile

func DeleteFile(path string) (err error)

DeleteFile - deletes the file.

func GetJSONContent added in v1.0.1

func GetJSONContent(path string) (map[string]interface{}, error)

GetJSONContent reads the file, parses it as JSON and returns the result.

func ReadFile added in v1.0.1

func ReadFile(path string) ([]byte, error)

ReadFile reads the file and replaces Windows line breaks with \r

Types

This section is empty.

Jump to

Keyboard shortcuts

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