Documentation ¶
Overview ¶
Package memfs provides a billy filesystem base on memory.
Index ¶
- func New() billy.Filesystem
- func NewWithStorage(storage Storage) billy.Filesystem
- type ByName
- type FileInfo
- type Memory
- func (fs *Memory) Capabilities() billy.Capability
- func (fs *Memory) Create(filename string) (billy.File, error)
- func (fs *Memory) Join(elem ...string) string
- func (fs *Memory) Lstat(filename string) (os.FileInfo, error)
- func (fs *Memory) MkdirAll(path string, perm os.FileMode) error
- func (fs *Memory) Open(filename string) (billy.File, error)
- func (fs *Memory) OpenFile(filename string, flag int, perm os.FileMode) (billy.File, error)
- func (fs *Memory) ReadDir(path string) ([]os.FileInfo, error)
- func (fs *Memory) Readlink(link string) (string, error)
- func (fs *Memory) Remove(filename string) error
- func (fs *Memory) Rename(from, to string) error
- func (fs *Memory) Stat(filename string) (os.FileInfo, error)
- func (fs *Memory) Symlink(target, link string) error
- func (fs *Memory) TempFile(dir, prefix string) (billy.File, error)
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWithStorage ¶
func NewWithStorage(storage Storage) billy.Filesystem
NewWithStorage returns a new Memory filesystem use custom storage backend
Types ¶
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory a very convenient filesystem based on memory files
func (*Memory) Capabilities ¶
func (fs *Memory) Capabilities() billy.Capability
Capabilities implements the Capable interface.
type Storage ¶
type Storage interface { Has(path string) bool Get(path string) (billy.File, bool) New(path string, mode os.FileMode, flag int) (billy.File, error) Children(path string) []billy.File Rename(from, to string) error Remove(path string) error }
func NewMemoryStorage ¶
func NewMemoryStorage() Storage
Click to show internal directories.
Click to hide internal directories.