2015-07-29 18:25:56 +00:00
|
|
|
// +build !linux,!windows,!freebsd
|
2014-02-21 09:12:25 +00:00
|
|
|
|
|
|
|
package system
|
|
|
|
|
2014-11-13 20:36:05 +00:00
|
|
|
import (
|
|
|
|
"syscall"
|
|
|
|
)
|
2014-02-21 09:12:25 +00:00
|
|
|
|
2015-03-31 08:03:31 +00:00
|
|
|
// fromStatT creates a system.Stat_t type from a syscall.Stat_t type
|
2015-03-11 15:42:49 +00:00
|
|
|
func fromStatT(s *syscall.Stat_t) (*Stat_t, error) {
|
|
|
|
return &Stat_t{size: s.Size,
|
2014-11-13 20:36:05 +00:00
|
|
|
mode: uint32(s.Mode),
|
|
|
|
uid: s.Uid,
|
|
|
|
gid: s.Gid,
|
|
|
|
rdev: uint64(s.Rdev),
|
|
|
|
mtim: s.Mtimespec}, nil
|
2014-02-21 09:12:25 +00:00
|
|
|
}
|