//go:build unix package archive import ( "io/fs" "syscall" ) // openNonblock keeps an open of a FIFO swapped in after the walk from // waiting for a writer; a regular file ignores it. const openNonblock = syscall.O_NONBLOCK // linkCount is a file's number of names (st_nlink). func linkCount(fi fs.FileInfo) uint64 { if st, ok := fi.Sys().(*syscall.Stat_t); ok { return uint64(st.Nlink) } return 1 }