Remoe stat_arm.go, make stat_linux.go with with both 32 and 64 bit systems

This commit is contained in:
Matthew Penner 2020-10-17 15:45:14 -06:00
parent 19d821aab5
commit 70804dd20f
2 changed files with 2 additions and 16 deletions

View File

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

View File

@ -1,5 +1,3 @@
// +build !arm
package filesystem package filesystem
import ( import (
@ -11,5 +9,6 @@ import (
func (s *Stat) CTime() time.Time { func (s *Stat) CTime() time.Time {
st := s.Info.Sys().(*syscall.Stat_t) st := s.Info.Sys().(*syscall.Stat_t)
return time.Unix(st.Ctim.Sec, st.Ctim.Nsec) // Do not remove these "redundant" type-casts, they are required for 32-bit builds to work.
return time.Unix(int64(st.Ctim.Sec), int64(st.Ctim.Nsec))
} }