stat_openbsd.go 289 B

123456789101112131415
  1. package system
  2. import (
  3. "syscall"
  4. )
  5. // fromStatT creates a system.StatT type from a syscall.Stat_t type
  6. func fromStatT(s *syscall.Stat_t) (*StatT, error) {
  7. return &StatT{size: s.Size,
  8. mode: uint32(s.Mode),
  9. uid: s.Uid,
  10. gid: s.Gid,
  11. rdev: uint64(s.Rdev),
  12. mtim: s.Mtim}, nil
  13. }