Documentation ¶
Index ¶
- Constants
- func ErrnoToRPCErrorString(err error) error
- func ErrnoToSym(errno syscall.Errno) string
- func RPCErrorStringTOErrno(err error) (syserr syscall.Errno)
- func SAFlagsToSystem(flagsIn uint16) (flags int)
- func SymToErrno(sym string) syscall.Errno
- func SystemToSAFlags(flagsIn int) (flags uint16)
- type CloseReply
- type CloseRequest
- type DirEntry
- type FsyncReply
- type FsyncRequest
- type LinkReply
- type LinkRequest
- type MkdirReply
- type MkdirRequest
- type OpenReply
- type OpenRequest
- type ReadDirReply
- type ReadDirRequest
- type ReadReply
- type ReadRequest
- type ReadlinkReply
- type ReadlinkRequest
- type RenameReply
- type RenameRequest
- type RmdirReply
- type RmdirRequest
- type SeekReply
- type SeekRequest
- type SetAttrReply
- type SetAttrRequest
- func (r *SetAttrRequest) GetATime() (m time.Time, ok bool)
- func (r *SetAttrRequest) GetGID() (g uint32, ok bool)
- func (r *SetAttrRequest) GetMTime() (m time.Time, ok bool)
- func (r *SetAttrRequest) GetMode() (m uint32, ok bool)
- func (r *SetAttrRequest) GetSize() (m uint64, ok bool)
- func (r *SetAttrRequest) GetUID() (u uint32, ok bool)
- func (r *SetAttrRequest) SetATime(a time.Time)
- func (r *SetAttrRequest) SetGID(g uint32)
- func (r *SetAttrRequest) SetMTime(m time.Time)
- func (r *SetAttrRequest) SetMode(m uint32)
- func (r *SetAttrRequest) SetSize(s uint64)
- func (r *SetAttrRequest) SetUID(u uint32)
- type StatReply
- type StatRequest
- type SymlinkReply
- type SymlinkRequest
- type UnlinkReply
- type UnlinkRequest
- type WriteReply
- type WriteRequest
Constants ¶
const ( SATTR_ATIME = (1 << 0) SATTR_GID = (1 << 1) SATTR_MODE = (1 << 2) SATTR_MTIME = (1 << 3) SATTR_SIZE = (1 << 4) SATTR_UID = (1 << 5) )
const ( O_RDONLY uint16 = 0 O_WRONLY uint16 = (1 << 0) O_RDWR uint16 = (1 << 1) O_APPEND uint16 = (1 << 2) O_ASYNC uint16 = (1 << 3) O_CREAT uint16 = (1 << 4) O_EXCL uint16 = (1 << 5) O_NOCTTY uint16 = (1 << 6) O_NONBLOCK uint16 = (1 << 7) O_SYNC uint16 = (1 << 8) O_TRUNC uint16 = (1 << 9) )
open() flags. Different OSes use different values for open flags. We translate OS specific into system agnostic flags and back to OS specific on the target system.
const UTIME_OMIT = ((1 << 30) - 2)
Variables ¶
This section is empty.
Functions ¶
func ErrnoToRPCErrorString ¶
ErrnoToRPCErrorString returns a structured error that can be parsed on the client. This is necessary as RPC framework in the standard lib doesn't return an /error/ but a string with the error message.
func ErrnoToSym ¶
ErrnoToSym converts system-specific errno codes to strings, to be converted back to errno codes on the other side.
This is needed as errno codes are not portable. (See Linux ENOTEMPTY vs Darwin EDESTADDRREQ). See also SymToErrno().
func RPCErrorStringTOErrno ¶
RPCErrorStringTOErrno converts a structured error into a syscall Errno. This is necessary as RPC framework in the standard lib doesn't return an /error/ but a string with the error message.
func SAFlagsToSystem ¶
SAFlagsToSystem converts the internal representation of open() flags to system-specific. See also SystemToSAFlags()
func SymToErrno ¶
SymToErrno converts symbolic representaton of an errno to errno code. See also ErrnoToSym().
func SystemToSAFlags ¶
SystemToSAFlags converts system-specific open() flags to an internal representation. See also SAFlagsToSystem()
Types ¶
type CloseReply ¶
type CloseReply struct{}
type CloseRequest ¶
type CloseRequest struct {
FD uintptr
}
type FsyncReply ¶
type FsyncReply struct{}
type FsyncRequest ¶
type LinkRequest ¶
type MkdirReply ¶
type MkdirReply StatReply
type MkdirRequest ¶
type OpenRequest ¶
type ReadDirReply ¶
type ReadDirReply struct {
DirEntries []DirEntry
}
type ReadDirRequest ¶
type ReadDirRequest struct {
FullPath string
}
type ReadRequest ¶
type ReadlinkReply ¶
type ReadlinkReply struct {
LinkTarget string
}
type ReadlinkRequest ¶
type ReadlinkRequest struct {
FullPath string
}
type RenameReply ¶
type RenameReply struct{}
type RenameRequest ¶
type RmdirReply ¶
type RmdirReply struct{}
type RmdirRequest ¶
type RmdirRequest struct {
FullPath string
}
type SeekRequest ¶
type SetAttrReply ¶
type SetAttrReply StatReply
type SetAttrRequest ¶
type SetAttrRequest struct { FullPath string ValidAttrs uint32 // See SATTR_* bitmap ATime time.Time MTime time.Time UID uint32 GID uint32 Mode uint32 Size uint64 }
func (*SetAttrRequest) GetGID ¶
func (r *SetAttrRequest) GetGID() (g uint32, ok bool)
func (*SetAttrRequest) GetMode ¶
func (r *SetAttrRequest) GetMode() (m uint32, ok bool)
func (*SetAttrRequest) GetSize ¶
func (r *SetAttrRequest) GetSize() (m uint64, ok bool)
func (*SetAttrRequest) GetUID ¶
func (r *SetAttrRequest) GetUID() (u uint32, ok bool)
func (*SetAttrRequest) SetATime ¶
func (r *SetAttrRequest) SetATime(a time.Time)
func (*SetAttrRequest) SetGID ¶
func (r *SetAttrRequest) SetGID(g uint32)
func (*SetAttrRequest) SetMTime ¶
func (r *SetAttrRequest) SetMTime(m time.Time)
func (*SetAttrRequest) SetMode ¶
func (r *SetAttrRequest) SetMode(m uint32)
func (*SetAttrRequest) SetSize ¶
func (r *SetAttrRequest) SetSize(s uint64)
func (*SetAttrRequest) SetUID ¶
func (r *SetAttrRequest) SetUID(u uint32)
type StatRequest ¶
type SymlinkReply ¶
type SymlinkReply struct{}
type SymlinkRequest ¶
type UnlinkReply ¶
type UnlinkReply struct{}
type UnlinkRequest ¶
type UnlinkRequest struct {
FullPath string
}
type WriteReply ¶
type WriteReply struct {
Num int
}