mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-10 05:27:07 +08:00
vendor: update buildkit to v0.18.0-rc1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
26
vendor/github.com/containerd/continuity/fs/stat_darwinbsd.go
generated
vendored
26
vendor/github.com/containerd/continuity/fs/stat_darwinbsd.go
generated
vendored
@ -19,10 +19,36 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"syscall"
|
||||
"time"
|
||||
)
|
||||
|
||||
func Atime(st fs.FileInfo) (time.Time, error) {
|
||||
stSys, ok := st.Sys().(*syscall.Stat_t)
|
||||
if !ok {
|
||||
return time.Time{}, fmt.Errorf("expected st.Sys() to be *syscall.Stat_t, got %T", st.Sys())
|
||||
}
|
||||
return time.Unix(stSys.Atimespec.Unix()), nil
|
||||
}
|
||||
|
||||
func Ctime(st fs.FileInfo) (time.Time, error) {
|
||||
stSys, ok := st.Sys().(*syscall.Stat_t)
|
||||
if !ok {
|
||||
return time.Time{}, fmt.Errorf("expected st.Sys() to be *syscall.Stat_t, got %T", st.Sys())
|
||||
}
|
||||
return time.Unix(stSys.Ctimespec.Unix()), nil
|
||||
}
|
||||
|
||||
func Mtime(st fs.FileInfo) (time.Time, error) {
|
||||
stSys, ok := st.Sys().(*syscall.Stat_t)
|
||||
if !ok {
|
||||
return time.Time{}, fmt.Errorf("expected st.Sys() to be *syscall.Stat_t, got %T", st.Sys())
|
||||
}
|
||||
return time.Unix(stSys.Mtimespec.Unix()), nil
|
||||
}
|
||||
|
||||
// StatAtime returns the access time from a stat struct
|
||||
func StatAtime(st *syscall.Stat_t) syscall.Timespec {
|
||||
return st.Atimespec
|
||||
|
4
vendor/github.com/containerd/continuity/fs/stat_unix.go
generated
vendored
4
vendor/github.com/containerd/continuity/fs/stat_unix.go
generated
vendored
@ -30,7 +30,7 @@ func Atime(st fs.FileInfo) (time.Time, error) {
|
||||
if !ok {
|
||||
return time.Time{}, fmt.Errorf("expected st.Sys() to be *syscall.Stat_t, got %T", st.Sys())
|
||||
}
|
||||
return StatATimeAsTime(stSys), nil
|
||||
return time.Unix(stSys.Atim.Unix()), nil
|
||||
}
|
||||
|
||||
func Ctime(st fs.FileInfo) (time.Time, error) {
|
||||
@ -38,7 +38,7 @@ func Ctime(st fs.FileInfo) (time.Time, error) {
|
||||
if !ok {
|
||||
return time.Time{}, fmt.Errorf("expected st.Sys() to be *syscall.Stat_t, got %T", st.Sys())
|
||||
}
|
||||
return time.Unix(stSys.Atim.Unix()), nil
|
||||
return time.Unix(stSys.Ctim.Unix()), nil
|
||||
}
|
||||
|
||||
func Mtime(st fs.FileInfo) (time.Time, error) {
|
||||
|
Reference in New Issue
Block a user