fileio

package
v5.11.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileIO

type FileIO interface {
	FileWriter
	FileReader
	TempFiler
	Stater
}

type FileIOAdapter

type FileIOAdapter struct{}

func (*FileIOAdapter) ReadFile

func (*FileIOAdapter) ReadFile(filename string) ([]byte, error)

func (*FileIOAdapter) Stat

func (*FileIOAdapter) Stat(name string) (os.FileInfo, error)

func (*FileIOAdapter) TempFile

func (*FileIOAdapter) TempFile(dir, prefix string) (f *os.File, err error)

func (*FileIOAdapter) WriteFile

func (*FileIOAdapter) WriteFile(filename string, data []byte, perm os.FileMode) error

type FileReader

type FileReader interface {
	ReadFile(filename string) ([]byte, error)
}

type FileWriter

type FileWriter interface {
	WriteFile(filename string, data []byte, perm os.FileMode) error
}

type Stater

type Stater interface {
	Stat(name string) (os.FileInfo, error)
}

type TempFiler

type TempFiler interface {
	TempFile(dir, prefix string) (f *os.File, err error)
}

Jump to

Keyboard shortcuts

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