Versions in this module Expand all Collapse all v0 v0.0.2 Jul 28, 2025 v0.0.1 Jul 22, 2025 Changes in this version + var ErrCrossingFSBoundaries = errors.New("crossing filesystem boundaries") + var ErrFSNotFound = errors.New("filesystem not found") + type ExitHandler func(int) + type OS struct + func New(opts ...Option) *OS + func (o *OS) Args() []string + func (o *OS) Chdir(dir string) error + func (o *OS) Create(name string) (risoros.File, error) + func (o *OS) CurrentUser() (risoros.User, error) + func (o *OS) Environ() []string + func (o *OS) Exit(code int) + func (o *OS) Getenv(key string) string + func (o *OS) Getpid() int + func (o *OS) Getuid() int + func (o *OS) Getwd() (dir string, err error) + func (o *OS) Hostname() (string, error) + func (o *OS) LookupEnv(key string) (string, bool) + func (o *OS) LookupGid(gid string) (risoros.Group, error) + func (o *OS) LookupGroup(name string) (risoros.Group, error) + func (o *OS) LookupUid(uid string) (risoros.User, error) + func (o *OS) LookupUser(name string) (risoros.User, error) + func (o *OS) Mkdir(name string, perm os.FileMode) error + func (o *OS) MkdirAll(path string, perm os.FileMode) error + func (o *OS) MkdirTemp(dir, pattern string) (string, error) + func (o *OS) Open(name string) (risoros.File, error) + func (o *OS) OpenFile(name string, flag int, perm os.FileMode) (risoros.File, error) + func (o *OS) PathListSeparator() rune + func (o *OS) PathSeparator() rune + func (o *OS) ReadDir(name string) ([]risoros.DirEntry, error) + func (o *OS) ReadFile(name string) ([]byte, error) + func (o *OS) Remove(name string) error + func (o *OS) RemoveAll(path string) error + func (o *OS) Rename(oldpath, newpath string) error + func (o *OS) Setenv(key, value string) error + func (o *OS) Stat(name string) (os.FileInfo, error) + func (o *OS) Stdin() risoros.File + func (o *OS) Stdout() risoros.File + func (o *OS) Symlink(oldname, newname string) error + func (o *OS) TempDir() string + func (o *OS) Unsetenv(key string) error + func (o *OS) UserCacheDir() (string, error) + func (o *OS) UserConfigDir() (string, error) + func (o *OS) UserHomeDir() (string, error) + func (o *OS) WalkDir(root string, fn risoros.WalkDirFunc) error + func (o *OS) WriteFile(name string, content []byte, perm os.FileMode) error + type Option func(*OS) + func WithArgs(args []string) Option + func WithEnvVar(name, value string) Option + func WithExitHandler(handler ExitHandler) Option + func WithFilesystems(fss map[string]risoros.FS) Option + func WithStdin(file risoros.File) Option + func WithStdout(file risoros.File) Option + func WithWorkDir(dir string) Option + type Pipe struct + func NewPipe() *Pipe + func (f *Pipe) Close() error + func (f *Pipe) Read(p []byte) (int, error) + func (f *Pipe) Stat() (risoros.FileInfo, error) + func (f *Pipe) Write(p []byte) (int, error)