stat_freebsd.go 289 B

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