Documentation ¶
Overview ¶
Package safememfs wraps go-billy/memfs's Open to correctly handle opening directories
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SafeOpener ¶
type SafeOpener struct {
billy.Filesystem
}
SafeOpener is a billy.Filesystem that fixes Open() behavior on directories with a work-around
func New ¶
func New() *SafeOpener
New creates a new billy/memfs file system that can handle opening directories
func (*SafeOpener) Open ¶
func (s *SafeOpener) Open(name string) (billy.File, error)
Open reimplements memfs.FS.Open() to fix bad behavior on opening directories
Click to show internal directories.
Click to hide internal directories.