Add support for listing a directory's contents

This commit is contained in:
Dane Everitt
2019-04-07 14:45:23 -07:00
parent 91afa4d38e
commit 0ace25c117
6 changed files with 146 additions and 6 deletions

View File

@@ -0,0 +1,13 @@
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.Ctim.Sec), int64(st.Ctim.Nsec))
}