Documentation
¶
Index ¶
- type FS
- type File
- type NoopFS
- func (n NoopFS) MkdirAll(path string, perm fs.FileMode) error
- func (n NoopFS) Open(name string) (File, error)
- func (n NoopFS) OpenFile(name string, flag int, perm fs.FileMode) (File, error)
- func (n NoopFS) ReadDir(name string) ([]fs.DirEntry, error)
- func (n NoopFS) Remove(name string) error
- func (n NoopFS) Rename(oldpath string, newpath string) error
- func (n NoopFS) Stat(name string) (fs.FileInfo, error)
- func (n NoopFS) WalkDir(root string, fn fs.WalkDirFunc) error
- type OSFS
- func (OSFS) MkdirAll(path string, perm fs.FileMode) error
- func (OSFS) Open(name string) (File, error)
- func (OSFS) OpenFile(name string, flag int, perm fs.FileMode) (File, error)
- func (OSFS) ReadDir(name string) ([]fs.DirEntry, error)
- func (OSFS) Remove(name string) error
- func (OSFS) Rename(oldpath string, newpath string) error
- func (OSFS) Stat(name string) (fs.FileInfo, error)
- func (OSFS) WalkDir(root string, fn fs.WalkDirFunc) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FS ¶
type FS interface {
Open(name string) (File, error)
OpenFile(name string, flag int, perm fs.FileMode) (File, error)
Stat(name string) (fs.FileInfo, error)
MkdirAll(path string, perm fs.FileMode) error
Rename(oldpath string, newpath string) error
Remove(name string) error
ReadDir(name string) ([]fs.DirEntry, error)
WalkDir(root string, fn fs.WalkDirFunc) error
}
FS is Coldkeep's minimal filesystem abstraction.
It intentionally covers only the filesystem operations identified by the v1.10.8 seam classification work. It is not a general virtual filesystem, path policy layer, repository layout abstraction, or fault-injection API.
type File ¶
type File interface {
io.Reader
io.Writer
io.Closer
io.ReaderAt
io.Seeker
Sync() error
Truncate(size int64) error
}
File is the minimal file handle abstraction required by FS.
The methods mirror the behavior needed by current Coldkeep read, write, close, durability-sync, random-read, seek, and truncate paths. All methods are satisfied by *os.File.
type NoopFS ¶
type NoopFS struct {
// contains filtered or unexported fields
}
NoopFS is a behavior-preserving wrapper around an FS.
It exists to provide an explicit seam for later deterministic wrappers while preserving the wrapped filesystem's behavior exactly in v1.10.8.
type OSFS ¶
type OSFS struct{}
OSFS is an FS implementation backed directly by the local operating system.
It must preserve standard library behavior exactly. It must not rewrite paths, retry operations, normalize errors, swallow errors, or add fault-injection behavior.