Documentation
¶
Index ¶
- type File
- func (f *File) Close() error
- func (f *File) Read(b []byte) (int, error)
- func (f *File) ReadAt(b []byte, off int64) (int, error)
- func (f *File) ReadDir(n int) ([]gofs.DirEntry, error)
- func (f *File) ReadFrom(r io.Reader) (int64, error)
- func (f *File) Readdir(count int) ([]gofs.FileInfo, error)
- func (f *File) Seek(off int64, whence int) (int64, error)
- func (f *File) Stat() (gofs.FileInfo, error)
- func (f *File) String() string
- func (f *File) Sync() error
- func (f *File) Write(p []byte) (int, error)
- type MemFS
- func (m *MemFS) Close() error
- func (m *MemFS) Create(name string) (fs.File, error)
- func (m *MemFS) Glob(pattern string) ([]string, error)
- func (m *MemFS) Mkdir(name string, perm gofs.FileMode) error
- func (m *MemFS) MkdirAll(path string, mode gofs.FileMode) error
- func (m *MemFS) Open(name string) (gofs.File, error)
- func (m *MemFS) OpenFile(name string, flag int, mode gofs.FileMode) (fs.File, error)
- func (m *MemFS) PathSeparator() string
- func (m *MemFS) Provider() string
- func (m *MemFS) ReadDir(name string) ([]gofs.DirEntry, error)
- func (m *MemFS) ReadFile(name string) ([]byte, error)
- func (m *MemFS) Remove(name string) error
- func (m *MemFS) RemoveAll(path string) error
- func (m *MemFS) Rename(oldpath string, newpath string) error
- func (m *MemFS) Root() (string, error)
- func (m *MemFS) Stat(name string) (gofs.FileInfo, error)
- func (m *MemFS) String() string
- func (m *MemFS) Sub(dir string) (gofs.FS, error)
- func (m *MemFS) WriteFile(name string, data []byte, mode gofs.FileMode) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File provides access to a single file or directory provided by MemFS.
Implements the behavior defined by the fs.File and http.File interfaces.
type MemFS ¶
type MemFS struct {
// contains filtered or unexported fields
}
MemFS in-memory file system provider that implements fs.FS.
Unless otherwise specified, all operations are transient and will be lost when the runtime exits.
Click to show internal directories.
Click to hide internal directories.