fileioperformer

package
v1.9.6 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeReadCloser

func MakeReadCloser(reader io.Reader) io.ReadCloser

MakeReadCloser will turn an an io.Reader into an io.ReadCloser if the underlying object does not already support io.ReadCloser

Types

type FileIoPerformer

type FileIoPerformer interface {
	// OpenFileReader is a function that opens a file and returns an io.Reader (at a minimum)
	OpenFileReader(name string, flag int, perm os.FileMode) (io.Reader, error)
	// OpenFileWriter is a function that opens a file and returns an io.WriteCloser (at a minimum)
	OpenFileWriter(name string, flag int, perm os.FileMode) (io.WriteCloser, error)
	// MkdirAll creates a directory tree (see os.MkdirAll)
	MkdirAll(path string, perm os.FileMode) error
}

func NewDefaultFileIoPerformer

func NewDefaultFileIoPerformer() FileIoPerformer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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