chroot

package
v5.9.2 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 50 modules, 47 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

This section is empty.

Functions

func New

func New(fs billy.Basic, base string) billy.Filesystem

New creates a new filesystem wrapping up the given 'fs'. The created filesystem has its base in the given ChrootHelperectory of the underlying filesystem.

Types

type ChrootHelper

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

ChrootHelper is a helper to implement billy.Chroot. It is not a security boundary, callers that need containment should use a filesystem implementation that enforces paths at the OS boundary instead.

func (*ChrootHelper) Capabilities

func (fs *ChrootHelper) Capabilities() billy.Capability

Capabilities implements the Capable interface.

func (*ChrootHelper) Chmod added in v5.7.0

func (fs *ChrootHelper) Chmod(path string, mode os.FileMode) error

func (*ChrootHelper) Chroot

func (fs *ChrootHelper) Chroot(path string) (billy.Filesystem, error)

func (*ChrootHelper) Create

func (fs *ChrootHelper) Create(filename string) (billy.File, error)

func (*ChrootHelper) Join

func (fs *ChrootHelper) Join(elem ...string) string

func (*ChrootHelper) Lstat

func (fs *ChrootHelper) Lstat(filename string) (os.FileInfo, error)

func (*ChrootHelper) MkdirAll

func (fs *ChrootHelper) MkdirAll(filename string, perm os.FileMode) error

func (*ChrootHelper) Open

func (fs *ChrootHelper) Open(filename string) (billy.File, error)

func (*ChrootHelper) OpenFile

func (fs *ChrootHelper) OpenFile(filename string, flag int, mode os.FileMode) (billy.File, error)

func (*ChrootHelper) ReadDir

func (fs *ChrootHelper) ReadDir(path string) ([]os.FileInfo, error)
func (fs *ChrootHelper) Readlink(link string) (string, error)

func (*ChrootHelper) Remove

func (fs *ChrootHelper) Remove(path string) error

func (*ChrootHelper) Rename

func (fs *ChrootHelper) Rename(from, to string) error

func (*ChrootHelper) Root

func (fs *ChrootHelper) Root() string

func (*ChrootHelper) Stat

func (fs *ChrootHelper) Stat(filename string) (os.FileInfo, error)
func (fs *ChrootHelper) Symlink(target, link string) error

func (*ChrootHelper) TempFile

func (fs *ChrootHelper) TempFile(dir, prefix string) (billy.File, error)

func (*ChrootHelper) Underlying

func (fs *ChrootHelper) Underlying() billy.Basic

Jump to

Keyboard shortcuts

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