Documentation
¶
Overview ¶
Package memfs is an in-memory file system for tests of code that reads through meaning.FS. Paths are slash-separated; a leading slash is ignored.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTooLarge = errors.New("the file is larger than what is read of it")
ErrTooLarge is the error of ReadFileMax for a file of more than max bytes (it stands for meaning.ErrTooLarge, which this package cannot import).
Functions ¶
This section is empty.
Types ¶
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
FS holds files in memory.
func New ¶
New returns a file system holding the given files (path to content). The paths named in symlinks are symbolic links instead of regular files.
func (FS) ReadFileMax ¶
ReadFileMax returns the content of a file of at most max bytes.
Click to show internal directories.
Click to hide internal directories.