mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 00:47:48 +08:00
19 lines
252 B
Go
19 lines
252 B
Go
//go:build !windows
|
|
// +build !windows
|
|
|
|
package fs
|
|
|
|
import (
|
|
"os"
|
|
"syscall"
|
|
)
|
|
|
|
func getLinkInfo(fi os.FileInfo) (uint64, bool) {
|
|
s, ok := fi.Sys().(*syscall.Stat_t)
|
|
if !ok {
|
|
return 0, false
|
|
}
|
|
|
|
return uint64(s.Ino), !fi.IsDir() && s.Nlink > 1
|
|
}
|