wings/server/filesystem/stat_linux.go

16 lines
242 B
Go
Raw Normal View History

2020-10-17 21:41:13 +00:00
// +build !arm
package filesystem
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(st.Ctim.Sec, st.Ctim.Nsec)
}