localfs

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Overview

Package localfs exposes the host's local file system as a p9.File.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attacher

func Attacher(root string) p9.Attacher

Attacher returns an attacher that exposes files under root.

func RootAttacher

func RootAttacher() p9.Attacher

RootAttacher attaches at the host file system's root.

Types

type Local

type Local struct {
	p9.DefaultWalkGetAttr
	templatefs.NoopFile
	// contains filtered or unexported fields
}

Local is a p9.File.

func (*Local) Close

func (l *Local) Close() error

Close implements p9.File.Close.

func (*Local) Create

func (l *Local) Create(name string, mode p9.OpenFlags, permissions p9.FileMode, _ p9.UID, _ p9.GID) (p9.File, p9.QID, uint32, error)

Create implements p9.File.Create.

func (*Local) FSync

func (l *Local) FSync() error

FSync implements p9.File.FSync.

func (*Local) GetAttr

func (l *Local) GetAttr(req p9.AttrMask) (p9.QID, p9.AttrMask, p9.Attr, error)

GetAttr implements p9.File.GetAttr.

Not fully implemented.

func (*Local) GetXattr added in v0.3.0

func (l *Local) GetXattr(attr string) ([]byte, error)
func (l *Local) Link(target p9.File, newname string) error

Link implements p9.File.Link.

Not properly implemented.

func (*Local) ListXattrs added in v0.3.0

func (l *Local) ListXattrs() ([]string, error)

func (*Local) Lock added in v0.3.0

func (l *Local) Lock(pid int, locktype p9.LockType, flags p9.LockFlags, start, length uint64, client string) (p9.LockStatus, error)

Lock implements p9.File.Lock.

func (*Local) Mkdir

func (l *Local) Mkdir(name string, permissions p9.FileMode, _ p9.UID, _ p9.GID) (p9.QID, error)

Mkdir implements p9.File.Mkdir.

Not properly implemented.

func (*Local) Open

func (l *Local) Open(mode p9.OpenFlags) (p9.QID, uint32, error)

Open implements p9.File.Open.

func (*Local) ReadAt

func (l *Local) ReadAt(p []byte, offset int64) (int, error)

ReadAt implements p9.File.ReadAt.

func (*Local) Readdir

func (l *Local) Readdir(offset uint64, count uint32) (p9.Dirents, error)

Readdir implements p9.File.Readdir.

func (l *Local) Readlink() (string, error)

Readlink implements p9.File.Readlink.

Not properly implemented.

func (*Local) RemoveXattr added in v0.3.0

func (l *Local) RemoveXattr(attr string) error

func (*Local) RenameAt

func (l *Local) RenameAt(oldName string, newDir p9.File, newName string) error

RenameAt implements p9.File.RenameAt.

func (*Local) Renamed

func (l *Local) Renamed(parent p9.File, newName string)

Renamed implements p9.File.Renamed.

func (*Local) SetAttr added in v0.3.0

func (l *Local) SetAttr(valid p9.SetAttrMask, attr p9.SetAttr) error

SetAttr implements p9.File.SetAttr.

func (*Local) SetXattr added in v0.3.0

func (l *Local) SetXattr(attr string, data []byte, flags p9.XattrFlags) error
func (l *Local) Symlink(oldname string, newname string, _ p9.UID, _ p9.GID) (p9.QID, error)

Symlink implements p9.File.Symlink.

Not properly implemented.

func (*Local) Walk

func (l *Local) Walk(names []string) ([]p9.QID, p9.File, error)

Walk implements p9.File.Walk.

func (*Local) WriteAt

func (l *Local) WriteAt(p []byte, offset int64) (int, error)

WriteAt implements p9.File.WriteAt.

Jump to

Keyboard shortcuts

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