filesystem

package
v4.42.1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: MIT Imports: 4 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(dst string, src string) error

func ReadAsset

func ReadAsset(file string) ([]byte, error)

func ReadFile

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

func WriteFile added in v4.37.2

func WriteFile(path string, payload []byte) error

Types

type FileReaderFunc

type FileReaderFunc func(path string) (io.ReadCloser, error)
var NewFileReader FileReaderFunc = func(path string) (io.ReadCloser, error) {
	return os.Open(path)
}

type FileSeekerFunc added in v4.39.0

type FileSeekerFunc func(path string) (io.ReadSeekCloser, error)
var NewFileSeeker FileSeekerFunc = func(path string) (io.ReadSeekCloser, error) {
	return os.Open(path)
}

type FileWriterFunc added in v4.37.2

type FileWriterFunc func(path string) (io.WriteCloser, error)
var NewFileWriter FileWriterFunc = func(path string) (io.WriteCloser, error) {
	return os.Create(path)
}

Jump to

Keyboard shortcuts

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