Documentation ¶
Overview ¶
Package memboxfs provides a billy.Fs-compatible filesystem implementation which limits the maxiumum size of the in-memory filesystem.
Index ¶
- Variables
- type LimitedFs
- func (_ *LimitedFs) Chroot(_ string) (billy.Filesystem, error)
- func (f *LimitedFs) Create(filename string) (billy.File, error)
- func (f *LimitedFs) Join(elem ...string) string
- func (f *LimitedFs) Lstat(filename string) (fs.FileInfo, error)
- func (f *LimitedFs) MkdirAll(filename string, perm fs.FileMode) error
- func (f *LimitedFs) Open(filename string) (billy.File, error)
- func (f *LimitedFs) OpenFile(filename string, flag int, perm fs.FileMode) (billy.File, error)
- func (f *LimitedFs) ReadDir(path string) ([]fs.FileInfo, error)
- func (f *LimitedFs) Readlink(link string) (string, error)
- func (f *LimitedFs) Remove(filename string) error
- func (f *LimitedFs) Rename(oldpath string, newpath string) error
- func (f *LimitedFs) Root() string
- func (f *LimitedFs) Stat(filename string) (fs.FileInfo, error)
- func (f *LimitedFs) Symlink(target string, link string) error
- func (f *LimitedFs) TempFile(dir string, prefix string) (billy.File, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotImplemented = fmt.Errorf("not implemented")
ErrNotImplemented is returned when a method is not implemented.
View Source
var ErrTooBig = fmt.Errorf("file too big")
ErrTooBig is returned when a file is too big.
View Source
var ErrTooManyFiles = fmt.Errorf("too many files")
ErrTooManyFiles is returned when there are too many files.
Functions ¶
This section is empty.
Types ¶
type LimitedFs ¶
type LimitedFs struct { Fs billy.Filesystem MaxFiles int64 TotalFileSize int64 // contains filtered or unexported fields }
LimitedFs provides a size-limited billy.Filesystem. This is a struct, there's no constructor here. Note that LimitedFs is not thread-safe.
func (*LimitedFs) Chroot ¶
func (_ *LimitedFs) Chroot(_ string) (billy.Filesystem, error)
Chroot implements billy.Filesystem.
Click to show internal directories.
Click to hide internal directories.