vfs

package
v1.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrControlPlane = errors.New("path is inside the runtime control plane")
View Source
var ErrCwdNotPermitted = errors.New("session cwd is not permitted")
View Source
var ErrEscape = errors.New("path escapes workspace root")
View Source
var ErrNotAllowed = errors.New("workspace root is not allowed")

Functions

func Contain

func Contain(root, candidate string) (string, error)

func ControlPlaneDenied

func ControlPlaneDenied() []string

func IsControlPlanePath

func IsControlPlanePath(candidate string) (string, bool)

func ResolveRoot

func ResolveRoot(root string) (string, error)

func ResolveSessionCwd

func ResolveSessionCwd(f *Factory, cwd, fallback string) (string, error)

func SetControlPlaneDenied

func SetControlPlaneDenied(paths ...string) error

func Within

func Within(root, abs string) bool

func WithinControlPlane

func WithinControlPlane(deniedDirs []string, candidate string) (string, bool)

Types

type Factory

type Factory struct {
	// contains filtered or unexported fields
}

func NewFactory

func NewFactory(roots ...string) (*Factory, error)

func (*Factory) Allows

func (f *Factory) Allows(root string) (string, bool)

func (*Factory) Default

func (f *Factory) Default() string

func (*Factory) DescribeRoots

func (f *Factory) DescribeRoots() string

func (*Factory) Open

func (f *Factory) Open(root string) (*View, error)

func (*Factory) Resolve

func (f *Factory) Resolve(root string) (string, error)

func (*Factory) Roots

func (f *Factory) Roots() []string

func (*Factory) SetRoots

func (f *Factory) SetRoots(roots []string) error

type View

type View struct {
	// contains filtered or unexported fields
}

func OpenPrivilegedView

func OpenPrivilegedView(root string) (*View, error)

func OpenView

func OpenView(root string) (*View, error)

func (*View) Contains

func (v *View) Contains(abs string) bool

func (*View) Resolve

func (v *View) Resolve(candidate string) (string, error)

func (*View) Root

func (v *View) Root() string

Jump to

Keyboard shortcuts

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