vfs

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultDirectoryPermissions = 0755
	DefaultFilePermissions      = 0644
)

Variables

This section is empty.

Functions

func Clean

func Clean(s string) string

Types

type VFS

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

VFS is a partial implementation of the fs.FullFS interface that aims to trick a consumer into thinking it has privileged access to a rootfs, when it's actually just being dumped on the disk somewhere.

func NewVFS

func NewVFS(path string) *VFS

func (*VFS) Chmod

func (V *VFS) Chmod(path string, perm fs.FileMode) error

func (*VFS) Chown

func (V *VFS) Chown(path string, uid int, gid int) error

func (*VFS) Create

func (V *VFS) Create(name string) (apkfs.File, error)

func (*VFS) GetXattr

func (V *VFS) GetXattr(path string, attr string) ([]byte, error)
func (V *VFS) Link(oldname, newname string) error

func (*VFS) ListXattrs

func (V *VFS) ListXattrs(path string) (map[string][]byte, error)

func (*VFS) Lstat

func (V *VFS) Lstat(path string) (fs.FileInfo, error)

func (*VFS) Mkdir

func (V *VFS) Mkdir(path string, perm fs.FileMode) error

func (*VFS) MkdirAll

func (V *VFS) MkdirAll(path string, perm fs.FileMode) error

func (*VFS) Mknod

func (V *VFS) Mknod(path string, mode uint32, dev int) error

func (*VFS) Open

func (V *VFS) Open(name string) (fs.File, error)

func (*VFS) OpenFile

func (V *VFS) OpenFile(name string, flag int, perm fs.FileMode) (apkfs.File, error)

func (*VFS) OpenReaderAt

func (V *VFS) OpenReaderAt(name string) (apkfs.File, error)

func (*VFS) Path

func (V *VFS) Path(path string) string

func (*VFS) ReadDir

func (V *VFS) ReadDir(name string) ([]fs.DirEntry, error)

func (*VFS) ReadFile

func (V *VFS) ReadFile(name string) ([]byte, error)
func (V *VFS) Readlink(name string) (target string, err error)

func (*VFS) Readnod

func (V *VFS) Readnod(name string) (dev int, err error)

func (*VFS) Remove

func (V *VFS) Remove(name string) error

func (*VFS) RemoveXattr

func (V *VFS) RemoveXattr(path string, attr string) error

func (*VFS) SetXattr

func (V *VFS) SetXattr(path string, attr string, data []byte) error

func (*VFS) Stat

func (V *VFS) Stat(path string) (fs.FileInfo, error)
func (V *VFS) Symlink(oldname, newname string) error

func (*VFS) WriteFile

func (V *VFS) WriteFile(name string, b []byte, mode fs.FileMode) error

Jump to

Keyboard shortcuts

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