fileio

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2018 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReaderToFile

func ReaderToFile(r io.Reader, dst string) error

ReaderToFile copies the data from a reader to a destination file.

Types

type Copier

type Copier interface {
	CopyFile(source, target string, uid, gid int) error
	CopyDir(source, target string, uid, gid int) error
}

Copier provides helper functions that copy files and directories to specified locations.

func NewCopier

func NewCopier(blacklist []string) Copier

NewCopier initializes a new copier object. Files from provided blacklist will be ignored.

func NewInternalCopier

func NewInternalCopier() Copier

NewInternalCopier initializes a new copier object. It is used for copying checkpointed files from sandbox dir, and there is no need to blacklist any path, since they would have been filtered out by checkpoint.

Jump to

Keyboard shortcuts

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