mirror of
https://github.com/pterodactyl/wings.git
synced 2025-12-10 00:32:17 -06:00
14 lines
237 B
Go
14 lines
237 B
Go
package filesystem
|
|
|
|
import (
|
|
"syscall"
|
|
"time"
|
|
)
|
|
|
|
// CTime returns the time that the file/folder was created.
|
|
func (s *Stat) CTime() time.Time {
|
|
st := s.Sys().(*syscall.Stat_t)
|
|
|
|
return time.Unix(st.Ctimespec.Sec, st.Ctimespec.Nsec)
|
|
}
|