Documentation ¶
Overview ¶
Package filesys provides an abstraction for working with file systems, mainly to facilitate testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
File provides the interface implemented by values returned from a file system's Open method.
type FileSystem ¶
type FileSystem interface { Open(path string) (File, error) Lstat(path string) (os.FileInfo, error) Readlink(path string) (string, error) Readdirnames(path string) ([]string, error) }
FileSystem provides the interface for operations over a file system.
func Map ¶
func Map(m map[string][]byte, links []string) FileSystem
Map returns a FileSystem for m, wherein keys are file paths and values are file contents. File paths should not contain a leading slash. If links is not nil, it will be used to simulate symbolic links: for each key in m that is also in links, its value in m is treated as the link target.
Click to show internal directories.
Click to hide internal directories.