We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5de3b97 commit 0069abbCopy full SHA for 0069abb
src/io/ioutil/ioutil.go
@@ -74,8 +74,8 @@ func ReadFile(filename string) ([]byte, error) {
74
}
75
76
// WriteFile writes data to a file named by filename.
77
-// If the file does not exist, WriteFile creates it with permissions perm;
78
-// otherwise WriteFile truncates it before writing.
+// If the file does not exist, WriteFile creates it with permissions perm
+// (before umask); otherwise WriteFile truncates it before writing.
79
func WriteFile(filename string, data []byte, perm os.FileMode) error {
80
f, err := os.OpenFile(filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, perm)
81
if err != nil {
0 commit comments