2020-02-23 08:48:26 +00:00
|
|
|
// +build !windows
|
|
|
|
|
|
|
|
package util
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
|
|
|
func SetFileModeForPath(name string, mode os.FileMode) error {
|
|
|
|
return os.Chmod(name, mode)
|
|
|
|
}
|
|
|
|
|
|
|
|
func SetFileModeForFile(file *os.File, mode os.FileMode) error {
|
|
|
|
return file.Chmod(mode)
|
|
|
|
}
|