idun/vendor/github.com/pkg/sftp/ls_plan9.go

23 lines
303 B
Go
Raw Normal View History

2023-10-12 08:20:53 +00:00
//go:build plan9
// +build plan9
package sftp
import (
"os"
"syscall"
)
func lsLinksUIDGID(fi os.FileInfo) (numLinks uint64, uid, gid string) {
numLinks = 1
uid, gid = "0", "0"
switch sys := fi.Sys().(type) {
case *syscall.Dir:
uid = sys.Uid
gid = sys.Gid
}
return numLinks, uid, gid
}