mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
17 lines
232 B
Go
17 lines
232 B
Go
// +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
|
|
}
|