1234567891011121314151617181920212223242526272829303132 |
- package unix
- import (
- "unsafe"
- )
- const _SYS_GETDIRENTRIES64 = 344
- func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
-
-
-
- var p unsafe.Pointer
- if len(buf) > 0 {
- p = unsafe.Pointer(&buf[0])
- } else {
- p = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(_SYS_GETDIRENTRIES64, uintptr(fd), uintptr(p), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- return n, errnoErr(e1)
- }
- return n, nil
- }
|