Versions in this module Expand all Collapse all v0 v0.4.0 Nov 7, 2026 Changes in this version + const DefaultEntries + const MaxDepth + const MaxPathBytes + var ErrArchive = errors.New("wsfs: bad archive") + var ErrBudget = errors.New("wsfs: over budget") + var ErrChecksum = errors.New("wsfs: sha256 mismatch") + var ErrEntries = errors.New("wsfs: too many entries") + var ErrForeignLink = errors.New("wsfs: hard link from outside the workspace") + var ErrNotEmpty = errors.New("wsfs: root not empty") + var ErrNotRegular = errors.New("wsfs: not a regular file") + var ErrPath = errors.New("wsfs: bad path") + var ErrSize = errors.New("wsfs: size mismatch") + var ErrTooLarge = errors.New("wsfs: too large") + var ErrUnsupported = errors.New("wsfs: unsupported on this platform") + func Clean(p string, allowRoot bool) (string, error) + type Budget interface + Release func(bytes, entries int64) + Reserve func(bytes, entries int64) error + type Counter struct + func NewCounter(l Limits) *Counter + func (c *Counter) Held() (bytes, entries int64) + func (c *Counter) Release(bytes, entries int64) + func (c *Counter) Reserve(bytes, entries int64) error + type File struct + func (f *File) Close() error + func (f *File) Info() Info + func (f *File) Read(p []byte) (int, error) + type Info struct + ModTime time.Time + Mode fs.FileMode + Path string + SHA256 []byte + Size int64 + type Limits struct + Bytes int64 + Entries int64 + type Options struct + Budget Budget + Limits Limits + Owner *Owner + type Owner struct + GID int + UID int + type Workspace struct + func Open(dir string, o Options) (*Workspace, error) + func Open(string, Options) (*Workspace, error) + func (*Workspace) Capture(io.Writer) error + func (*Workspace) Close() + func (*Workspace) Download(string, int64) (*File, error) + func (*Workspace) List(string) ([]Info, error) + func (*Workspace) Size() (int64, int64, error) + func (*Workspace) Unpack(io.Reader) error + func (*Workspace) Upload(string, int64, fs.FileMode, []byte, io.Reader) (Info, error) + func (w *Workspace) Capture(out io.Writer) error + func (w *Workspace) Close() + func (w *Workspace) Download(p string, offset int64) (*File, error) + func (w *Workspace) List(p string) ([]Info, error) + func (w *Workspace) Size() (bytes, entries int64, err error) + func (w *Workspace) Unpack(in io.Reader) error + func (w *Workspace) Upload(p string, size int64, mode fs.FileMode, sum []byte, r io.Reader) (Info, error) v0.4.0-rc.1 Nov 6, 2026