Documentation
¶
Index ¶
- func DirFile(info *Node, entries ...fs.DirEntry) fs.File
- func FileFS(file fs.File, name string) fs.FS
- func MatchPaths(paths []string, name string) (matches []string)
- func NamedFS(fsys fs.FS, name string) fs.FS
- func SetData(n *Node, data []byte)
- func SetGid(n *Node, gid int)
- func SetLogger(n *Node, log *slog.Logger)
- func SetModTime(n *Node, modTime time.Time)
- func SetMode(n *Node, mode fs.FileMode)
- func SetName(n *Node, name string)
- func SetSize(n *Node, size int64)
- func SetSys(n *Node, sys any)
- func SetUid(n *Node, uid int)
- func UnionDir(name string, mode fs.FileMode, dirs ...fs.File) fs.File
- type DirIter
- type FuncFile
- type MapFS
- func (fsys MapFS) Open(name string) (fs.File, error)
- func (fsys MapFS) OpenContext(ctx context.Context, name string) (fs.File, error)
- func (fsys MapFS) ResolveFS(ctx context.Context, name string) (fs.FS, string, error)
- func (fsys MapFS) Stat(name string) (fs.FileInfo, error)
- func (fsys MapFS) StatContext(ctx context.Context, name string) (fs.FileInfo, error)
- type Node
- func (n *Node) Data() []byte
- func (n *Node) Info() (fs.FileInfo, error)
- func (n *Node) IsDir() bool
- func (n *Node) Log() *slog.Logger
- func (n *Node) ModTime() time.Time
- func (n *Node) Mode() fs.FileMode
- func (n *Node) Name() string
- func (n *Node) Open(name string) (fs.File, error)
- func (n *Node) OpenContext(ctx context.Context, name string) (fs.File, error)
- func (n *Node) Path() string
- func (n *Node) Reader() io.Reader
- func (n *Node) Size() int64
- func (n *Node) String() string
- func (n *Node) Sys() any
- func (n *Node) Type() fs.FileMode
- func (n *Node) Writer() io.Writer
- type OpenFunc
- type OverlayFile
- func (f *OverlayFile) Close() error
- func (f *OverlayFile) Read(s []byte) (int, error)
- func (f *OverlayFile) ReadAt(s []byte, o int64) (int, error)
- func (f *OverlayFile) ReadDir(c int) ([]fs.DirEntry, error)
- func (f *OverlayFile) Seek(o int64, w int) (pos int64, err error)
- func (f *OverlayFile) Stat() (os.FileInfo, error)
- func (f *OverlayFile) Sync() (err error)
- func (f *OverlayFile) Write(s []byte) (n int, err error)
- func (f *OverlayFile) WriteAt(s []byte, o int64) (n int, err error)
- type StreamFile
- type UnionFS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileFS ¶
FileFS wraps a single fs.File as an fs.FS such that opening "." returns that file (not a directory).
func MatchPaths ¶
func SetModTime ¶
Types ¶
type FuncFile ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node is used to create an fs.FileInfo, fs.DirEntry, or fs.FS.
func (*Node) OpenContext ¶
TODO: open sub nodes
type OpenFunc ¶
func (OpenFunc) OpenContext ¶
type OverlayFile ¶
type OverlayFile struct {
Base fs.File
Overlay fs.File
HideFn func(name string) bool // if true, entry is hidden from readdir results
// contains filtered or unexported fields
}
func (*OverlayFile) Close ¶
func (f *OverlayFile) Close() error
func (*OverlayFile) Sync ¶
func (f *OverlayFile) Sync() (err error)
type StreamFile ¶
func NewStreamFile ¶
func (*StreamFile) Close ¶
func (f *StreamFile) Close() error
func (*StreamFile) Identity ¶
func (f *StreamFile) Identity() fs.ID
Click to show internal directories.
Click to hide internal directories.