filesystem

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Closer

type Closer interface {
	Close() error
}

Closer implements Close()

type Fileinfo

type Fileinfo struct {
	User  string
	Group string
	Mode  os.FileMode
}

Fileinfo is a struct that holds User, Group, and Mode

type Filesystem

type Filesystem interface {
	Reader
	Writer
	Closer
}

Filesystem implements Reader, Writer and Closer

func NewFilesystem

func NewFilesystem(name string) (Filesystem, error)

NewFilesystem returns a Filesystem interface backed by a bare filesystem

type Reader

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

Reader provides read-related methods which are runnable on a bare filesystem or a tar.gz file

func NewTGZReader

func NewTGZReader(r io.ReadSeeker) (Reader, error)

NewTGZReader returns a Reader interface backed by a tar.gz file

type WriteCloser

type WriteCloser interface {
	Writer
	Closer
}

WriteCloser implements Writer and Closer

func NewTGZWriter

func NewTGZWriter(w io.Writer) (WriteCloser, error)

NewTGZWriter returns a WriteCloser interface backed by a tar.gz file

type Writer

type Writer interface {
	Mkdir(filename string, fileInfo Fileinfo) error
	WriteFile(filename string, data []byte, fileInfo Fileinfo) error
}

Writer provides write-related methods which are runnable on a bare filesystem or a tar.gz file

Jump to

Keyboard shortcuts

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