wings/server/filesystem_linux.go
2020-09-05 13:08:40 -06:00

14 lines
222 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(st.Ctim.Sec, st.Ctim.Nsec)
}