]> Cypherpunks repositories - gostls13.git/commitdiff
os: mention the influence of umask in docs
authorMatthijs Kooijman <matthijs@stdin.nl>
Wed, 13 Dec 2017 15:45:09 +0000 (16:45 +0100)
committerIan Lance Taylor <iant@golang.org>
Fri, 15 Dec 2017 21:07:41 +0000 (21:07 +0000)
Change-Id: Ia05fac3298334d6b44267ce02bffcd7bf8a54c72
Reviewed-on: https://go-review.googlesource.com/83775
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/os/file.go
src/os/path.go

index f9cf2b61ab23eeb57ef324236a64f4a9b493c3e5..c667421dc6ef89383fe027dfc80ab7a9db40c984 100644 (file)
@@ -208,7 +208,8 @@ func (f *File) WriteString(s string) (n int, err error) {
        return f.Write([]byte(s))
 }
 
-// Mkdir creates a new directory with the specified name and permission bits.
+// Mkdir creates a new directory with the specified name and permission
+// bits (before umask).
 // If there is an error, it will be of type *PathError.
 func Mkdir(name string, perm FileMode) error {
        e := syscall.Mkdir(fixLongPath(name), syscallMode(perm))
@@ -260,7 +261,7 @@ func Create(name string) (*File, error) {
 
 // OpenFile is the generalized open call; most users will use Open
 // or Create instead. It opens the named file with specified flag
-// (O_RDONLY etc.) and perm, (0666 etc.) if applicable. If successful,
+// (O_RDONLY etc.) and perm (before umask), if applicable. If successful,
 // methods on the returned File can be used for I/O.
 // If there is an error, it will be of type *PathError.
 func OpenFile(name string, flag int, perm FileMode) (*File, error) {
index 17c49c8687debd72ea4b34017d26ba205b94980c..eb996e5fb9174b9aad4f45b3a795d89f7b9cedf0 100644 (file)
@@ -13,7 +13,7 @@ import (
 // MkdirAll creates a directory named path,
 // along with any necessary parents, and returns nil,
 // or else returns an error.
-// The permission bits perm are used for all
+// The permission bits perm (before umask) are used for all
 // directories that MkdirAll creates.
 // If path is already a directory, MkdirAll does nothing
 // and returns nil.