Documentation ¶
Overview ¶
Package osproxy is a package that provides an os proxy for the app.
Index ¶
- Variables
- type FileInstance
- type FileInstanceInterface
- type Os
- type OsProxy
- func (*OsProxy) Create(name string) (FileInstanceInterface, error)
- func (*OsProxy) FileMode(perm fsproxy.FileMode) fsproxy.FileMode
- func (*OsProxy) Getenv(key string) string
- func (*OsProxy) IsNotExist(err error) bool
- func (*OsProxy) MkdirAll(path string, perm fsproxy.FileMode) error
- func (*OsProxy) Open(name string) (*FileInstance, error)
- func (*OsProxy) Pipe() (*FileInstance, *FileInstance, error)
- func (*OsProxy) Remove(name string) error
- func (*OsProxy) RemoveAll(path string) error
- func (*OsProxy) Stat(name string) (*fsproxy.FileInfoInstance, error)
- func (*OsProxy) TempDir() string
Constants ¶
This section is empty.
Variables ¶
View Source
var Args = os.Args
Args is a variable for os.Args.
View Source
var Stderr = os.Stderr
Stderr is a variable for os.Stderr.
View Source
var Stdout = os.Stdout
Stdout is a variable for os.Stdout.
Functions ¶
This section is empty.
Types ¶
type FileInstance ¶
FileInstance is a struct that implements FileInstanceInterface.
func (*FileInstance) Close ¶
func (f *FileInstance) Close() error
Close is a proxy for os.File.Close().
func (*FileInstance) Read ¶
func (f *FileInstance) Read(p []byte) (n int, err error)
Read is a proxy for os.File.Read().
type FileInstanceInterface ¶
type FileInstanceInterface interface { Close() error Read(p []byte) (n int, err error) Seek(offset int64, whence int) (int64, error) Write(b []byte) (n int, err error) }
FileInstanceInterface is an interface for os.File.
type Os ¶
type Os interface { Create(name string) (FileInstanceInterface, error) FileMode(perm fsproxy.FileMode) fsproxy.FileMode Getenv(key string) string IsNotExist(err error) bool MkdirAll(path string, perm fsproxy.FileMode) error Open(name string) (*FileInstance, error) Pipe() (*FileInstance, *FileInstance, error) Remove(name string) error RemoveAll(path string) error Stat(name string) (*fsproxy.FileInfoInstance, error) TempDir() string }
Os is an interface for os.
type OsProxy ¶
type OsProxy struct{}
OsProxy is a struct that implements Os.
func (*OsProxy) Create ¶
func (*OsProxy) Create(name string) (FileInstanceInterface, error)
Create is a proxy for os.Create.
func (*OsProxy) FileMode ¶
func (*OsProxy) FileMode(perm fsproxy.FileMode) fsproxy.FileMode
Filemode is a proxy for os.FileMode.
func (*OsProxy) IsNotExist ¶
IsNotExist is a proxy for os.IsNotExist.
func (*OsProxy) Open ¶
func (*OsProxy) Open(name string) (*FileInstance, error)
Open is a proxy for os.Open.
func (*OsProxy) Pipe ¶
func (*OsProxy) Pipe() (*FileInstance, *FileInstance, error)
Pipe is a proxy for os.Pipe.
Click to show internal directories.
Click to hide internal directories.