2016-11-22 19:32:10 +00:00
|
|
|
// +build !windows
|
|
|
|
|
|
|
|
package system
|
|
|
|
|
|
|
|
import (
|
2017-09-12 23:29:24 +00:00
|
|
|
"golang.org/x/sys/unix"
|
2016-11-22 19:32:10 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Umask sets current process's file mode creation mask to newmask
|
|
|
|
// and returns oldmask.
|
|
|
|
func Umask(newmask int) (oldmask int, err error) {
|
2017-09-12 23:29:24 +00:00
|
|
|
return unix.Umask(newmask), nil
|
2016-11-22 19:32:10 +00:00
|
|
|
}
|