memfs

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemFS

type MemFS struct {
	// contains filtered or unexported fields
}

MemFS implements the ZapFS interface for in-memory file storage. It is safe for use with concurrent read and writes.

func NewMemFS

func NewMemFS() *MemFS

NewMemFS returns a new instance of a MemFS.

func (*MemFS) Read

func (mem *MemFS) Read(name string) (tlsfs.ZapFile, error)

Read returns the giving ZapFile if found in the filesystem.

func (*MemFS) ReadAll

func (mem *MemFS) ReadAll() ([]tlsfs.ZapFile, error)

ReadAll returns all ZapFile available in memory.

func (*MemFS) Remove

func (mem *MemFS) Remove(name string) error

Remove removes the giving file from memory.

func (*MemFS) RemoveAll

func (mem *MemFS) RemoveAll() error

RemoveAll deletes the container of all stored zap bytes in memory.

func (*MemFS) Write

func (mem *MemFS) Write(name string) (tlsfs.ZapWriter, error)

Write returns ZapWriter to write contents as a zap file.

func (*MemFS) WriteFile

func (mem *MemFS) WriteFile(zapped tlsfs.ZapFile) error

WriteFile adds the giving ZapFile into the filesystem.

Jump to

Keyboard shortcuts

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