mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 18:41:59 -07:00
26 lines
537 B
Go
26 lines
537 B
Go
|
// Copyright (C) 2019 The Syncthing Authors.
|
||
|
//
|
||
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
||
|
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||
|
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
||
|
|
||
|
// +build !windows
|
||
|
|
||
|
package fs
|
||
|
|
||
|
import "syscall"
|
||
|
|
||
|
func (e fsFileInfo) Owner() int {
|
||
|
if st, ok := e.Sys().(*syscall.Stat_t); ok {
|
||
|
return int(st.Uid)
|
||
|
}
|
||
|
return -1
|
||
|
}
|
||
|
|
||
|
func (e fsFileInfo) Group() int {
|
||
|
if st, ok := e.Sys().(*syscall.Stat_t); ok {
|
||
|
return int(st.Gid)
|
||
|
}
|
||
|
return -1
|
||
|
}
|