perms
Package perms
import "github.com/luxfi/node/utils/perms"Functions
ChmodR
func ChmodR(dir string, dirOnly bool, perm os.FileMode) errorChmodR sets the permissions of all directories and optionally files to [perm] permissions.
Create
func Create(filename string, perm os.FileMode) (*os.File, error)Create a file at [filename] that has [perm] permissions.
WriteFile
func WriteFile(filename string, data []byte, perm os.FileMode) errorWriteFile writes [data] to [filename] and ensures that [filename] has [perm] permissions. Will write atomically on linux/macos and fall back to non-atomic ioutil.WriteFile on windows.