Documentation ¶
Index ¶
- Constants
- Variables
- func DirModeToOSMode(dm uint32) (osmode int)
- func DirToQid(dir plan9.Dir) plan9.Qid
- func FileInfoToDir(stat os.FileInfo) (dir plan9.Dir)
- func PackError(fc *plan9.Fcall, err error) *plan9.Fcall
- func Plan9PermToUnix(p uint32) os.FileMode
- type Client
- type Context
- type File
- type FileContents
- type Fileserver
- type HasContent
- type InMemory
- func (in *InMemory) Bytes() []byte
- func (in *InMemory) Close() error
- func (in *InMemory) Expand(sz int)
- func (in *InMemory) Open(mode int, perm int) (FileContents, error)
- func (in *InMemory) Read(b []byte) (int, error)
- func (in *InMemory) Seek(sz int64, sp SeekPoint) (int64, error)
- func (in *InMemory) Size() (uint64, error)
- func (in *InMemory) Sync() error
- func (in *InMemory) Write(b []byte) (int, error)
- type RPC
- type SeekPoint
- type Server
- type ServerFS
Constants ¶
View Source
const ( SeekStart = SeekPoint(0) SeekCurrent = SeekPoint(1) SeekEnd = SeekPoint(2) )
Variables ¶
View Source
var (
ErrInvalidFid = errors.New("invalid fid")
)
Functions ¶
func DirModeToOSMode ¶
func Plan9PermToUnix ¶
Types ¶
type Client ¶
func ConnectLocal ¶
Connect to a local 9p server running on port 5640
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func NewContext() *Context
type File ¶
type File struct { Name string // contains filtered or unexported fields }
func NewFile ¶
func NewFile(name string, content HasContent) *File
func (*File) Contents ¶
func (f *File) Contents() (FileContents, error)
type FileContents ¶
type Fileserver ¶
type Fileserver struct {
ServerFS
}
type HasContent ¶
type ServerFS ¶
type ServerFS interface { Version(*plan9.Fcall, *Context) *plan9.Fcall Attach(*plan9.Fcall, *Context) *plan9.Fcall Auth(*plan9.Fcall, *Context) *plan9.Fcall Clunk(*plan9.Fcall, *Context) *plan9.Fcall Flush(*plan9.Fcall, *Context) *plan9.Fcall Open(*plan9.Fcall, *Context) *plan9.Fcall Create(*plan9.Fcall, *Context) *plan9.Fcall Read(*plan9.Fcall, *Context) *plan9.Fcall Write(*plan9.Fcall, *Context) *plan9.Fcall Remove(*plan9.Fcall, *Context) *plan9.Fcall Stat(*plan9.Fcall, *Context) *plan9.Fcall Wstat(*plan9.Fcall, *Context) *plan9.Fcall Walk(*plan9.Fcall, *Context) *plan9.Fcall ValidFid(*plan9.Fcall, *Context) bool ReleaseContext(*Context) error }
Click to show internal directories.
Click to hide internal directories.