filesystem_ops

package
v0.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMergeConflict = errors.New("merge conflict")

Functions

This section is empty.

Types

type CreateMode

type CreateMode uint8
const (
	CreateModeTruncate CreateMode = iota // create or truncate
)

type OpenMode

type OpenMode uint8
const (
	OpenModeDefault   OpenMode = iota // shared read
	OpenModeExclusive                 // exclusive lock (for blob reads)
)

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 (o *OsFilesystemOps) EvalSymlinks(path string) (string, error)

func (*OsFilesystemOps) GetCwd

func (o *OsFilesystemOps) GetCwd() string

func (*OsFilesystemOps) Lstat

func (o *OsFilesystemOps) Lstat(path string) (fs.FileInfo, error)

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)
}

type VCurrent

type VCurrent = V0

Source Files

  • main.go
  • os.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL