mirror of
https://github.com/containers/podman.git
synced 2025-08-23 17:22:30 +08:00
16 lines
273 B
Go
16 lines
273 B
Go
//go:build linux
|
|
|
|
package ctime
|
|
|
|
import (
|
|
"os"
|
|
"syscall"
|
|
"time"
|
|
)
|
|
|
|
func created(fi os.FileInfo) time.Time {
|
|
st := fi.Sys().(*syscall.Stat_t)
|
|
//nolint:unconvert // need to type cast on some cpu architectures
|
|
return time.Unix(int64(st.Ctim.Sec), int64(st.Ctim.Nsec))
|
|
}
|