rclone/vendor/github.com/pkg/sftp/attrs_unix.go

18 lines
355 B
Go
Raw Normal View History

// +build darwin dragonfly freebsd !android,linux netbsd openbsd solaris aix
2016-11-13 01:04:55 +01:00
// +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 {
2020-02-25 15:20:57 +01:00
*flags |= sshFileXferAttrUIDGID
2016-11-13 01:04:55 +01:00
fileStat.UID = statt.Uid
fileStat.GID = statt.Gid
}
}