vendor: add github.com/a8m/tree
This commit is contained in:
parent
da9926d574
commit
bfef0bc2e9
19 changed files with 1302 additions and 1 deletions
20
vendor/github.com/a8m/tree/stat_unix.go
generated
vendored
Normal file
20
vendor/github.com/a8m/tree/stat_unix.go
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
//+build !plan9,!windows
|
||||
|
||||
package tree
|
||||
|
||||
import (
|
||||
"os"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func getStat(fi os.FileInfo) (ok bool, inode, device, uid, gid uint64) {
|
||||
sys := fi.Sys()
|
||||
if sys == nil {
|
||||
return false, 0, 0, 0, 0
|
||||
}
|
||||
stat, ok := sys.(*syscall.Stat_t)
|
||||
if !ok {
|
||||
return false, 0, 0, 0, 0
|
||||
}
|
||||
return true, uint64(stat.Ino), uint64(stat.Dev), uint64(stat.Uid), uint64(stat.Gid)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue