idun/vendor/github.com/pkg/sftp/attrs_unix.go
Renovate Bot cc69014892
Some checks failed
Dev Version / Release (push) Has been cancelled
chore(deps): update module github.com/pkg/sftp to v1.13.7
2024-10-23 18:10:37 +00:00

17 lines
465 B
Go

//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
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
}
}