mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 15:47:57 +08:00
weed filer.copy: use existing file owner and gropu id
This commit is contained in:
12
weed/util/file_util_non_posix.go
Normal file
12
weed/util/file_util_non_posix.go
Normal file
@@ -0,0 +1,12 @@
|
||||
// +build linux darwin freebsd netbsd openbsd plan9 solaris zos
|
||||
|
||||
package util
|
||||
|
||||
import (
|
||||
"os"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func GetFileUidGid(fi os.FileInfo) (uid, gid uint32) {
|
||||
return fi.Sys().(*syscall.Stat_t).Uid, fi.Sys().(*syscall.Stat_t).Gid
|
||||
}
|
Reference in New Issue
Block a user