Versions in this module Expand all Collapse all v1 v1.0.1 May 27, 2025 Changes in this version + var SkipThis = errors.New("skip this") + func IsErrorCode(err error, code ErrorCode) bool + func IsFilesystemError(err error) bool + func NewBadPathResolution(path string, resolved string) error + type Archive struct + BaseDirectory string + Files []string + Filesystem *Filesystem + Ignore string + Progress *progress.Progress + func (a *Archive) Create(ctx context.Context, dst string) error + func (a *Archive) Stream(ctx context.Context, w io.Writer) error + type Error struct + func (e *Error) Code() ErrorCode + func (e *Error) Error() string + func (e *Error) Unwrap() error + type ErrorCode string + const ErrCodeDenylistFile + const ErrCodeDiskSpace + const ErrCodeIsDirectory + const ErrCodePathResolution + const ErrCodeUnknownArchive + const ErrCodeUnknownError + const ErrNotExist + type Filesystem struct + func New(root string, size int64, denylist []string) (*Filesystem, error) + func (fs *Filesystem) CachedUsage() int64 + func (fs *Filesystem) Chmod(path string, mode ufs.FileMode) error + func (fs *Filesystem) Chown(p string) error + func (fs *Filesystem) Chtimes(path string, atime, mtime time.Time) error + func (fs *Filesystem) CompressFiles(dir string, paths []string) (ufs.FileInfo, error) + func (fs *Filesystem) Copy(p string) error + func (fs *Filesystem) CreateDirectory(name string, p string) error + func (fs *Filesystem) DecompressFile(ctx context.Context, dir string, file string) error + func (fs *Filesystem) Delete(p string) error + func (fs *Filesystem) DirectorySize(root string) (int64, error) + func (fs *Filesystem) DiskUsage(allowStaleValue bool) (int64, error) + func (fs *Filesystem) ExtractStreamUnsafe(ctx context.Context, dir string, r io.Reader) error + func (fs *Filesystem) File(p string) (ufs.File, Stat, error) + func (fs *Filesystem) HasSpaceAvailable(allowStaleValue bool) bool + func (fs *Filesystem) HasSpaceErr(allowStaleValue bool) error + func (fs *Filesystem) HasSpaceFor(size int64) error + func (fs *Filesystem) IsIgnored(paths ...string) error + func (fs *Filesystem) ListDirectory(p string) ([]Stat, error) + func (fs *Filesystem) MaxDisk() int64 + func (fs *Filesystem) Path() string + func (fs *Filesystem) ReadDir(path string) ([]ufs.DirEntry, error) + func (fs *Filesystem) ReadDirStat(path string) ([]ufs.FileInfo, error) + func (fs *Filesystem) Rename(oldpath, newpath string) error + func (fs *Filesystem) SetDiskLimit(i int64) + func (fs *Filesystem) SpaceAvailableForDecompression(ctx context.Context, dir string, file string) error + func (fs *Filesystem) Stat(p string) (Stat, error) + func (fs *Filesystem) Symlink(oldpath, newpath string) error + func (fs *Filesystem) Touch(p string, flag int) (ufs.File, error) + func (fs *Filesystem) TruncateRootDirectory() error + func (fs *Filesystem) UnixFS() *ufs.UnixFS + func (fs *Filesystem) Write(p string, r io.Reader, newSize int64, mode ufs.FileMode) error + func (fs *Filesystem) Writefile(p string, r io.Reader) error + type SpaceCheckingOpts struct + AllowStaleResponse bool + type Stat struct + Mimetype string + func (s *Stat) CTime() time.Time + func (s *Stat) MarshalJSON() ([]byte, error) + type TarProgress struct + func NewTarProgress(w *tar.Writer, p *progress.Progress) *TarProgress + func (p *TarProgress) Write(v []byte) (int, error)