store

package
v0.0.0-...-975194c Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoSuchFile        = errors.New("[spork]: no such file or directory")
	ErrFileAlreadyExists = errors.New("[spork]: file exists")
	ErrDirectoryNotEmpty = errors.New("[spork]: directory not empty")
	ErrStaleHandle       = errors.New("[spork]: stale file handle")
)

Functions

This section is empty.

Types

type File

type File struct {
	*sync.RWMutex

	Id      uint64
	Name    string
	Mode    FileMode
	Size    int64
	Version uint64
	Atime   time.Time
	Mtime   time.Time

	Parent   *File
	Children []*File
}

func (*File) Deserialize

func (f *File) Deserialize(r io.Reader) error

func (*File) MarshalJSON

func (f *File) MarshalJSON() ([]byte, error)

func (*File) Serialize

func (f *File) Serialize(w io.Writer) error

func (*File) UnmarshalJSON

func (f *File) UnmarshalJSON(b []byte) error

TODO this doesn't work. It will create a separate lock for each new file even fi they have the same ID

type FileMode

type FileMode = os.FileMode
const (
	ModeDirectory   FileMode = os.ModeDir
	ModeRegularFile FileMode = 0666
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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