sysfs

package
v0.0.0-...-49c5947 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrIsDir = errors.New("is a directory, expected a file")

ErrIsDir is returned when target file is a directory and not a file.

Functions

This section is empty.

Types

type SystemZapFS

type SystemZapFS struct {
	Dir string
}

SystemZapFS implements the tlsfs.ZapFS ontop on the internal os filesystem.

func NewSystemZapFS

func NewSystemZapFS(dir string) *SystemZapFS

NewSystemZapFS returns a new instance of SystemZapFS which creates all files within the provided directory path.

func (*SystemZapFS) Read

func (sm *SystemZapFS) Read(path string) (tlsfs.ZapFile, error)

Read returns the ZapFile associated with given path with their associated ZapTracks.

func (*SystemZapFS) ReadAll

func (sm *SystemZapFS) ReadAll() ([]tlsfs.ZapFile, error)

ReadAll returns all ZapFiles within given directory of the filesystem.

func (*SystemZapFS) Remove

func (sm *SystemZapFS) Remove(path string) error

Remove removes the underline path if it exists from the filesystem.

func (*SystemZapFS) RemoveAll

func (sm *SystemZapFS) RemoveAll() error

RemoveAll deletes the container of all stored zap files.

func (*SystemZapFS) Write

func (sm *SystemZapFS) Write(path string) (tlsfs.ZapWriter, error)

Write returns a ZapWriter which flushes all data added to it as a single compressed zap file. All sections provided for the file will be gzipped.

func (*SystemZapFS) WriteFile

func (sm *SystemZapFS) WriteFile(zapped tlsfs.ZapFile) error

WriteFile writes provided ZapFile into fs.

Jump to

Keyboard shortcuts

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