Documentation
¶
Index ¶
- Variables
- type CreateMode
- type OpenMode
- type OsFilesystemOps
- func (o *OsFilesystemOps) Create(path string, mode CreateMode) (io.WriteCloser, error)
- func (o *OsFilesystemOps) CreateTemp(dir, pattern string) (string, io.WriteCloser, error)
- func (o *OsFilesystemOps) EvalSymlinks(path string) (string, error)
- func (o *OsFilesystemOps) GetCwd() string
- func (o *OsFilesystemOps) Lstat(path string) (fs.FileInfo, error)
- func (o *OsFilesystemOps) Merge(base, current, other io.Reader) (io.ReadCloser, error)
- func (o *OsFilesystemOps) Open(path string, mode OpenMode) (io.ReadCloser, error)
- func (o *OsFilesystemOps) ReadDir(path string) ([]fs.DirEntry, error)
- func (o *OsFilesystemOps) Rel(path string) (string, error)
- func (o *OsFilesystemOps) Remove(path string) error
- func (o *OsFilesystemOps) Rename(oldpath, newpath string) error
- func (o *OsFilesystemOps) WalkDir(root string, fn fs.WalkDirFunc) error
- type V0
- type VCurrent
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CreateMode ¶
type CreateMode uint8
const (
CreateModeTruncate CreateMode = iota // create or truncate
)
type OsFilesystemOps ¶
type OsFilesystemOps struct {
// contains filtered or unexported fields
}
func MakeOsFilesystemOps ¶
func MakeOsFilesystemOps(cwd string) *OsFilesystemOps
func (*OsFilesystemOps) Create ¶
func (o *OsFilesystemOps) Create( path string, mode CreateMode, ) (io.WriteCloser, error)
func (*OsFilesystemOps) CreateTemp ¶
func (o *OsFilesystemOps) CreateTemp( dir, pattern string, ) (string, io.WriteCloser, error)
func (*OsFilesystemOps) EvalSymlinks ¶
func (o *OsFilesystemOps) EvalSymlinks(path string) (string, error)
func (*OsFilesystemOps) GetCwd ¶
func (o *OsFilesystemOps) GetCwd() string
func (*OsFilesystemOps) Merge ¶
func (o *OsFilesystemOps) Merge( base, current, other io.Reader, ) (io.ReadCloser, error)
func (*OsFilesystemOps) Open ¶
func (o *OsFilesystemOps) Open( path string, mode OpenMode, ) (io.ReadCloser, error)
func (*OsFilesystemOps) ReadDir ¶
func (o *OsFilesystemOps) ReadDir(path string) ([]fs.DirEntry, error)
func (*OsFilesystemOps) Rel ¶
func (o *OsFilesystemOps) Rel(path string) (string, error)
func (*OsFilesystemOps) Remove ¶
func (o *OsFilesystemOps) Remove(path string) error
func (*OsFilesystemOps) Rename ¶
func (o *OsFilesystemOps) Rename(oldpath, newpath string) error
func (*OsFilesystemOps) WalkDir ¶
func (o *OsFilesystemOps) WalkDir(root string, fn fs.WalkDirFunc) error
type V0 ¶
type V0 interface {
Open(path string, mode OpenMode) (io.ReadCloser, error)
Create(path string, mode CreateMode) (io.WriteCloser, error)
CreateTemp(dir, pattern string) (path string, w io.WriteCloser, err error)
ReadDir(path string) ([]fs.DirEntry, error)
Rename(oldpath, newpath string) error
Remove(path string) error
GetCwd() string
Rel(path string) (string, error)
Lstat(path string) (fs.FileInfo, error)
EvalSymlinks(path string) (string, error)
WalkDir(root string, fn fs.WalkDirFunc) error
Merge(base, current, other io.Reader) (io.ReadCloser, error)
}
Source Files
¶
- main.go
- os.go
Click to show internal directories.
Click to hide internal directories.