sys

package
v0.0.0-...-013a1ee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package sys contains non-portable routines.

Index

Constants

View Source
const (
	DefaultUid = ""
	DefaultGid = ""
)

DefaultUid and DefaultGid are the default group and owner for a file if ownership information cannot be retrieved.

Variables

This section is empty.

Functions

func FileOwner

func FileOwner(fi os.FileInfo) (uid, gid, muid string)

FileOwner retrieves ownership information for a file. uid and gid are the owner and group of a file, respectively. muid is the uid of the user who last modified the file.

FileOwner will emply multiple strategies to get file ownership information. If fi or fi.Sys() implements any methods in the styx.OwnerInfo interface, they are used. Otherwise, FileOwner will attempt to retrieve ownership information from the host operating sytsem. If such information cannot be retrieved, FileOwner will fall back to DefaultUid and DefaultGid.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL