inode

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupported = errors.New("unsupported action")

ErrUnsupported is used when an action is not supported.

Functions

This section is empty.

Types

type Reader

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

A Reader can read a folder as a tarball or a file.

func NewReader

func NewReader(inode string) (*Reader, error)

NewReader returns a new Reader.

func (*Reader) Close

func (r *Reader) Close() error

Close implements io.Closer.

func (*Reader) IsTarball

func (r *Reader) IsTarball() bool

IsTarball returns true if the reader reads a folder as tarball.

func (*Reader) Name

func (r *Reader) Name() string

Name returns the name of the reader.

func (*Reader) Read

func (r *Reader) Read(p []byte) (int, error)

Read implements io.Reader.

type Writer

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

A Writer can write a folder from a tarball or a file.

func NewWriter

func NewWriter(inode string, extract bool) (*Writer, error)

NewWriter returns a new Writer.

func (*Writer) Close

func (w *Writer) Close() error

Close implements io.Closer.

func (*Writer) Stat

func (w *Writer) Stat() (os.FileInfo, error)

Stat returns the FileInfo structure describing file.

func (*Writer) Sync

func (w *Writer) Sync() error

Sync commits the current contents of the file to stable storage.

func (*Writer) Write

func (w *Writer) Write(p []byte) (int, error)

Write implements io.Writer.

Jump to

Keyboard shortcuts

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