5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-14 16:40:26 +00:00
matterbridge/vendor/github.com/pkg/sftp/attrs_unix.go

18 lines
354 B
Go
Raw Normal View History

2018-03-04 22:46:13 +00:00
// +build darwin dragonfly freebsd !android,linux netbsd openbsd solaris
// +build cgo
package sftp
import (
"os"
"syscall"
)
func fileStatFromInfoOs(fi os.FileInfo, flags *uint32, fileStat *FileStat) {
if statt, ok := fi.Sys().(*syscall.Stat_t); ok {
*flags |= ssh_FILEXFER_ATTR_UIDGID
fileStat.UID = statt.Uid
fileStat.GID = statt.Gid
}
}