Signed-off-by: Vincent Batts <vbatts@hashbangbash.com> oci: abstract out syscall for platforms Signed-off-by: Vincent Batts <vbatts@hashbangbash.com> oci: abstract out the unix pipe per platform Signed-off-by: Vincent Batts <vbatts@hashbangbash.com> oci: change the unix calls to be platform independent Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
23 lines
415 B
Go
23 lines
415 B
Go
// +build !linux
|
|
|
|
package oci
|
|
|
|
import (
|
|
"os"
|
|
"time"
|
|
)
|
|
|
|
func getFinishedTime(fi os.FileInfo) time.Time {
|
|
// Windows would be like
|
|
//st := fi.Sys().(*syscall.Win32FileAttributeDatao)
|
|
//st.CreationTime.Nanoseconds()
|
|
|
|
// Darwin and Freebsd would be like
|
|
//st := fi.Sys().(*syscall.Stat_t)
|
|
//st.Ctimespec.Nsec
|
|
|
|
// openbsd would be like
|
|
//st := fi.Sys().(*syscall.Stat_t)
|
|
//st.Ctim.Nsec
|
|
return fi.ModTime()
|
|
}
|