github.com/moby/docker@v26.1.3+incompatible/pkg/system/stat_bsd.go (about)

     1  //go:build freebsd || netbsd
     2  
     3  package system // import "github.com/docker/docker/pkg/system"
     4  
     5  import "syscall"
     6  
     7  // fromStatT converts a syscall.Stat_t type to a system.Stat_t type
     8  func fromStatT(s *syscall.Stat_t) (*StatT, error) {
     9  	return &StatT{
    10  		size: s.Size,
    11  		mode: uint32(s.Mode),
    12  		uid:  s.Uid,
    13  		gid:  s.Gid,
    14  		rdev: uint64(s.Rdev),
    15  		mtim: s.Mtimespec,
    16  	}, nil
    17  }