mirror of
https://github.com/containers/skopeo.git
synced 2025-09-28 21:46:48 +00:00
TEST PR for: https://github.com/containers/image/pull/603 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
20 lines
308 B
Go
20 lines
308 B
Go
// +build darwin freebsd
|
|
|
|
package storage
|
|
|
|
import (
|
|
"time"
|
|
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
func (l *lockfile) TouchedSince(when time.Time) bool {
|
|
st := unix.Stat_t{}
|
|
err := unix.Fstat(int(l.fd), &st)
|
|
if err != nil {
|
|
return true
|
|
}
|
|
touched := time.Unix(st.Mtimespec.Unix())
|
|
return when.Before(touched)
|
|
}
|