Source file
src/os/dirent_aix.go
1
2
3
4
5 package os
6
7 import (
8 "syscall"
9 "unsafe"
10 )
11
12 func direntIno(buf []byte) (uint64, bool) {
13 return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Ino), unsafe.Sizeof(syscall.Dirent{}.Ino))
14 }
15
16 func direntReclen(buf []byte) (uint64, bool) {
17 return readInt(buf, unsafe.Offsetof(syscall.Dirent{}.Reclen), unsafe.Sizeof(syscall.Dirent{}.Reclen))
18 }
19
20 func direntNamlen(buf []byte) (uint64, bool) {
21 reclen, ok := direntReclen(buf)
22 if !ok {
23 return 0, false
24 }
25 return reclen - uint64(unsafe.Offsetof(syscall.Dirent{}.Name)), true
26 }
27
28 func direntType(buf []byte) FileMode {
29 return ^FileMode(0)
30 }
31
View as plain text