file

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(dst, src string, perm os.FileMode) error

CopyFile copies the contents from src to dst atomically. If dst does not exist, CopyFile creates it with permissions perm. If the copy fails, CopyFile aborts and dst is preserved.

Modified version of: https://go-review.googlesource.com/c/go/+/1591

func MaybeAddCompression

func MaybeAddCompression(file string, w io.WriteCloser) (io.WriteCloser, error)

func NewFileReader

func NewFileReader(file string) (f io.ReadCloser, err error)

func NewFileWriter

func NewFileWriter(file string) (w io.WriteCloser, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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