]> Cypherpunks repositories - gostls13.git/commitdiff
comment change
authorRobert Griesemer <gri@golang.org>
Wed, 8 Jul 2009 21:56:20 +0000 (14:56 -0700)
committerRobert Griesemer <gri@golang.org>
Wed, 8 Jul 2009 21:56:20 +0000 (14:56 -0700)
R=r
OCL=31359
CL=31359

src/pkg/io/utils.go

index f3331a20c5f8b8c9ae2cebc00482f75a5a3629d8..23acfb4ef173479e0798ce067a3b854c359b500d 100644 (file)
@@ -30,8 +30,8 @@ func ReadFile(filename string) ([]byte, os.Error) {
 }
 
 // WriteFile writes data to a file named by filename.
-// If the file does not exist, WriteFile creates it with permissions perm.
-//
+// If the file does not exist, WriteFile creates it with permissions perm;
+// otherwise WriteFile truncates it before writing.
 func WriteFile(filename string, data []byte, perm int) os.Error {
        f, err := os.Open(filename, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, perm);
        if err != nil {