types_linux.go 1.13 KB
Newer Older
1
package fuse
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

type Attr struct {
	Ino       uint64
	Size      uint64
	Blocks    uint64
	Atime     uint64
	Mtime     uint64
	Ctime     uint64
	Atimensec uint32
	Mtimensec uint32
	Ctimensec uint32
	Mode      uint32
	Nlink     uint32
	Owner
	Rdev    uint32
	Blksize uint32
	Padding uint32
}

type SetAttrIn struct {
	SetAttrInCommon
}
24 25 26 27 28 29 30

const (
	// Mask for GetAttrIn.Flags. If set, GetAttrIn has a file handle set.
	FUSE_GETATTR_FH = (1 << 0)
)

type GetAttrIn struct {
31 32
	InHeader

33
	Flags_ uint32
Han-Wen Nienhuys's avatar
Han-Wen Nienhuys committed
34
	Dummy  uint32
35 36 37
	Fh_    uint64
}

38 39
// Flags accesses the flags. This is a method, because OSXFuse does not
// have GetAttrIn flags.
40
func (g *GetAttrIn) Flags() uint32 {
Han-Wen Nienhuys's avatar
Han-Wen Nienhuys committed
41
	return g.Flags_
42 43
}

44 45
// Fh accesses the file handle. This is a method, because OSXFuse does not
// have GetAttrIn flags.
46 47 48
func (g *GetAttrIn) Fh() uint64 {
	return g.Fh_
}
49 50

type ReadIn struct {
51
	InHeader
52 53 54 55 56 57 58 59
	Fh        uint64
	Offset    uint64
	Size      uint32
	ReadFlags uint32
	LockOwner uint64
	Flags     uint32
	Padding   uint32
}
60 61

type WriteIn struct {
62
	InHeader
63 64 65 66 67 68 69 70
	Fh         uint64
	Offset     uint64
	Size       uint32
	WriteFlags uint32
	LockOwner  uint64
	Flags      uint32
	Padding    uint32
}