2024-10-23 18:10:37 +00:00
|
|
|
//go:build darwin || dragonfly || freebsd || (!android && linux) || netbsd || openbsd || solaris || aix || js || zos
|
|
|
|
// +build darwin dragonfly freebsd !android,linux netbsd openbsd solaris aix js zos
|
2023-10-12 08:20:53 +00:00
|
|
|
|
|
|
|
package sftp
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"syscall"
|
|
|
|
)
|
|
|
|
|
|
|
|
func fileStatFromInfoOs(fi os.FileInfo, flags *uint32, fileStat *FileStat) {
|
|
|
|
if statt, ok := fi.Sys().(*syscall.Stat_t); ok {
|
|
|
|
*flags |= sshFileXferAttrUIDGID
|
|
|
|
fileStat.UID = statt.Uid
|
|
|
|
fileStat.GID = statt.Gid
|
|
|
|
}
|
|
|
|
}
|