ufs

package
v0.0.0-...-c5c548c Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2018 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SeekStart = 0
)

Variables

This section is empty.

Functions

func NewUFS

func NewUFS(opts ...protocol.ServerOpt) (*protocol.Server, error)

func OModeToUnixFlags

func OModeToUnixFlags(mode protocol.Mode) int

Types

type File

type File struct {
	protocol.QID

	File *os.File
	// contains filtered or unexported fields
}

type FileServer

type FileServer struct {
	Versioned bool
	Files     map[protocol.FID]*File
	IOunit    protocol.MaxSize
	// contains filtered or unexported fields
}

func (*FileServer) Rattach

func (e *FileServer) Rattach(fid protocol.FID, afid protocol.FID, uname string, aname string) (protocol.QID, error)

func (*FileServer) Rclunk

func (e *FileServer) Rclunk(fid protocol.FID) error

func (*FileServer) Rcreate

func (e *FileServer) Rcreate(fid protocol.FID, name string, perm protocol.Perm, mode protocol.Mode) (protocol.QID, protocol.MaxSize, error)

func (*FileServer) Rflush

func (e *FileServer) Rflush(o protocol.Tag) error

func (*FileServer) Ropen

func (*FileServer) Rread

func (e *FileServer) Rread(fid protocol.FID, o protocol.Offset, c protocol.Count) ([]byte, error)

func (*FileServer) Rremove

func (e *FileServer) Rremove(fid protocol.FID) error

Rremove removes the file. The question of whether the file continues to be accessible is system dependent.

func (*FileServer) Rstat

func (e *FileServer) Rstat(fid protocol.FID) ([]byte, error)

func (*FileServer) Rversion

func (e *FileServer) Rversion(msize protocol.MaxSize, version string) (protocol.MaxSize, string, error)

func (*FileServer) Rwalk

func (e *FileServer) Rwalk(fid protocol.FID, newfid protocol.FID, paths []string) ([]protocol.QID, error)

func (*FileServer) Rwrite

func (e *FileServer) Rwrite(fid protocol.FID, o protocol.Offset, b []byte) (protocol.Count, error)

func (*FileServer) Rwstat

func (e *FileServer) Rwstat(fid protocol.FID, b []byte) error

type ServerOpt

type ServerOpt func(*protocol.Server) error

Jump to

Keyboard shortcuts

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