syscall_darwin.go 621 B

12345678910111213141516171819202122
  1. // Copyright 2009,2010 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package syscall
  5. import (
  6. "internal/abi"
  7. "unsafe"
  8. )
  9. func direntIno(buf []byte) (uint64, bool) {
  10. return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
  11. }
  12. func direntReclen(buf []byte) (uint64, bool) {
  13. return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
  14. }
  15. func direntNamlen(buf []byte) (uint64, bool) {
  16. return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
  17. }