gotools/godoc/vfs/mapfs/mapfs.go

// New returns a new FileSystem from the provided map.
// Map keys must be forward slash-separated paths with
// no leading slash, such as "file1.txt" or "dir/file2.txt".
// New panics if any of the paths contain a leading slash.
func New(m map[string]string) vfs.FileSystem {}

type mapFS

func (fs mapFS) String() string {}

func (fs mapFS) RootType(p string) vfs.RootType {}

func (fs mapFS) Close() error {}

func filename(p string) string {}

func (fs mapFS) Open(p string) (vfs.ReadSeekCloser, error) {}

func fileInfo(name, contents string) os.FileInfo {}

func dirInfo(name string) os.FileInfo {}

func (fs mapFS) Lstat(p string) (os.FileInfo, error) {}

func (fs mapFS) Stat(p string) (os.FileInfo, error) {}

// slashdir returns path.Dir(p), but special-cases paths not beginning
// with a slash to be in the root.
func slashdir(p string) string {}

func (fs mapFS) ReadDir(p string) ([]os.FileInfo, error) {}

type mapFI

func (fi mapFI) IsDir() bool        {}

func (fi mapFI) ModTime() time.Time {}

func (fi mapFI) Mode() os.FileMode {}

func (fi mapFI) Name() string     {}

func (fi mapFI) Size() int64      {}

func (fi mapFI) Sys() interface{}

type nopCloser

func (nc nopCloser) Close() error {}