Documentation ¶
Overview ¶
Package fs abstracts the filesystem.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filesystem ¶
type Filesystem interface { Create(path string) (File, error) Open(path string) (File, error) Remove(path string) error Rename(oldname, newname string) error Exists(path string) bool MkdirAll(path string) error Chtimes(path string, atime, mtime time.Time) error Walk(root string, walkFn filepath.WalkFunc) error Lock(path string) (r Releaser, existed bool, err error) }
Filesystem collects the operations we need from a filesystem.
func NewNopFilesystem ¶
func NewNopFilesystem() Filesystem
NewNopFilesystem has methods that always succeed but do nothing.
func NewRealFilesystem ¶
func NewRealFilesystem() Filesystem
NewRealFilesystem yields a real disk filesystem with optional memory mapping for file reading.
func NewVirtualFilesystem ¶
func NewVirtualFilesystem() Filesystem
NewVirtualFilesystem yields an in-memory filesystem.
Click to show internal directories.
Click to hide internal directories.