sivafs

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

README

go-billy-siva GoDoc Build Status

go-billy-siva is a limit billy filesystem implementation based on siva. The implementation is limited to billy.Basic and billy.Dir, the usage of the billy.helpers is required to be able of use as a full billy.Filesystem

Installation

The recommended way to install go-billy-siva

go get -u gopkg.in/src-d/go-billy-siva.v1/...

License

Apache License 2.0, see LICENSE

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNonSeekableFile          = errors.New("file non-seekable")
	ErrAlreadyClosed            = errors.New("file was already closed")
	ErrFileWriteModeAlreadyOpen = errors.New("previous file in write mode already open")
	ErrReadOnlyFile             = errors.New("file is read-only")
	ErrWriteOnlyFile            = errors.New("file is write-only")
)

Functions

This section is empty.

Types

type SivaFS

type SivaFS interface {
	billy.Basic
	billy.Dir

	// Sync closes any open files, this method should be called at the end of
	// program to ensure that all the files are properly closed, otherwise the
	// siva file will be corrupted.
	Sync() error
}

func New

func New(fs billy.Filesystem, path string) SivaFS

New creates a new filesystem backed by a siva file with the given path in the given filesystem. The siva file will be opened or created lazily with the first operation.

All files opened in write mode must be closed, otherwise the siva file will be corrupted.

Jump to

Keyboard shortcuts

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