wings/server/filesystem_darwin.go
2019-04-07 14:45:23 -07:00

13 lines
245 B
Go

package server
import (
"syscall"
"time"
)
// Returns the time that the file/folder was created.
func (s *Stat) CTime() time.Time {
st := s.Info.Sys().(*syscall.Stat_t)
return time.Unix(int64(st.Ctimespec.Sec), int64(st.Ctimespec.Nsec))
}