Documentation
¶
Index ¶
- Variables
- type ExitHandler
- type 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 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
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFSNotFound = errors.New("filesystem not found") ErrCrossingFSBoundaries = errors.New("crossing filesystem boundaries") )
Functions ¶
This section is empty.
Types ¶
type ExitHandler ¶
type ExitHandler func(int)
type OS ¶
type OS struct {
// contains filtered or unexported fields
}
func (*OS) PathListSeparator ¶
func (*OS) PathSeparator ¶
func (*OS) UserCacheDir ¶
func (*OS) UserConfigDir ¶
func (*OS) UserHomeDir ¶
type Option ¶
type Option func(*OS)
func WithEnvVar ¶
func WithExitHandler ¶
func WithExitHandler(handler ExitHandler) Option
func WithStdout ¶
func WithWorkDir ¶
Click to show internal directories.
Click to hide internal directories.