Remoe stat_arm.go, make stat_linux.go with with both 32 and 64 bit systems
This commit is contained in:
parent
19d821aab5
commit
70804dd20f
|
@ -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))
|
|
||||||
}
|
|
|
@ -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))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user