Documentation
¶
Overview ¶
Package workspacefs supplies the filesystem boundary shared by tools and harness discovery. Storage and hook state remain runtime-owned host files.
Index ¶
- func ValidPath(name string) (string, error)
- func WalkDir(reader Reader, root string, visit fs.WalkDirFunc) error
- type FS
- type Host
- func (h Host) Chmod(name string, mode fs.FileMode) error
- func (h Host) CreateExclusive(name string, data []byte, mode fs.FileMode) error
- func (h Host) Lstat(name string) (fs.FileInfo, error)
- func (h Host) MkdirAll(name string, mode fs.FileMode) error
- func (h Host) Open(name string) (fs.File, error)
- func (h Host) ReadDir(name string) ([]fs.DirEntry, error)
- func (h Host) ReadFile(name string) ([]byte, error)
- func (h Host) RealPath(name string) (string, error)
- func (h Host) Remove(name string) error
- func (h Host) RemoveAll(name string) error
- func (h Host) RenameNoReplace(source, destination string) error
- func (h Host) Stat(name string) (fs.FileInfo, error)
- func (h Host) WriteFileAtomic(name string, data []byte, mode fs.FileMode) error
- type Memory
- type ReadOnly
- func (r ReadOnly) Chmod(string, fs.FileMode) error
- func (r ReadOnly) CreateExclusive(string, []byte, fs.FileMode) error
- func (r ReadOnly) Lstat(name string) (fs.FileInfo, error)
- func (r ReadOnly) MkdirAll(string, fs.FileMode) error
- func (r ReadOnly) Open(name string) (fs.File, error)
- func (r ReadOnly) ReadDir(name string) ([]fs.DirEntry, error)
- func (r ReadOnly) ReadFile(name string) ([]byte, error)
- func (r ReadOnly) RealPath(name string) (string, error)
- func (r ReadOnly) Remove(string) error
- func (r ReadOnly) RemoveAll(string) error
- func (r ReadOnly) RenameNoReplace(string, string) error
- func (r ReadOnly) Stat(name string) (fs.FileInfo, error)
- func (r ReadOnly) WriteFileAtomic(string, []byte, fs.FileMode) error
- type Reader
- type Root
- func (r Root) Chmod(name string, mode fs.FileMode) error
- func (r Root) CreateExclusive(name string, data []byte, mode fs.FileMode) error
- func (r Root) Lstat(name string) (fs.FileInfo, error)
- func (r Root) MkdirAll(name string, mode fs.FileMode) error
- func (r Root) Open(name string) (fs.File, error)
- func (r Root) ReadDir(name string) ([]fs.DirEntry, error)
- func (r Root) ReadFile(name string) ([]byte, error)
- func (r Root) RealPath(name string) (string, error)
- func (r Root) Remove(name string) error
- func (r Root) RemoveAll(name string) error
- func (r Root) RenameNoReplace(source, destination string) error
- func (r Root) Stat(name string) (fs.FileInfo, error)
- func (r Root) WriteFileAtomic(name string, data []byte, mode fs.FileMode) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FS ¶
type FS interface {
Reader
CreateExclusive(string, []byte, fs.FileMode) error
WriteFileAtomic(string, []byte, fs.FileMode) error
MkdirAll(string, fs.FileMode) error
Remove(string) error
RemoveAll(string) error
RenameNoReplace(string, string) error
Chmod(string, fs.FileMode) error
}
FS additionally supplies atomic mutations used by file tools.
type Host ¶
type Host struct{ Directory string }
Host preserves the process account's full host filesystem access.
func (Host) CreateExclusive ¶
func (Host) RenameNoReplace ¶
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory holds immutable harness source files with synthetic parent directories.
type ReadOnly ¶
ReadOnly adapts an io/fs filesystem, enforcing relative valid paths.
func (ReadOnly) CreateExclusive ¶
type Reader ¶
type Reader interface {
Stat(string) (fs.FileInfo, error)
Lstat(string) (fs.FileInfo, error)
ReadDir(string) ([]fs.DirEntry, error)
Open(string) (fs.File, error)
ReadFile(string) ([]byte, error)
RealPath(string) (string, error)
}
Reader is the filesystem surface needed by prompts and harness discovery.
type Root ¶
Root confines every operation through os.Root, including parent traversal.
func (Root) CreateExclusive ¶
func (Root) RenameNoReplace ¶
Click to show internal directories.
Click to hide internal directories.