fileioperformer

package
v4.0.0-dev.4 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

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