2019-04-07 21:45:23 +00:00
|
|
|
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)
|
|
|
|
|
2020-09-05 19:08:40 +00:00
|
|
|
return time.Unix(st.Ctim.Sec, st.Ctim.Nsec)
|
|
|
|
}
|