@@ -252,7 +252,7 @@ fail, and does nothing otherwise.
252
252
253
253
## fs.appendFile(file, data[ , options] , callback)
254
254
255
- * ` file ` {String|Number } filename or file descriptor
255
+ * ` file ` {String} filename
256
256
* ` data ` {String|Buffer}
257
257
* ` options ` {Object|String}
258
258
* ` encoding ` {String|Null} default = ` 'utf8' `
@@ -278,10 +278,6 @@ If `options` is a string, then it specifies the encoding. Example:
278
278
fs .appendFile (' message.txt' , ' data to append' , ' utf8' , callback);
279
279
```
280
280
281
- Any specified file descriptor has to have been opened for appending.
282
-
283
- _ Note: Specified file descriptors will not be closed automatically._
284
-
285
281
## fs.appendFileSync(file, data[ , options] )
286
282
287
283
The synchronous version of [ ` fs.appendFile() ` ] [ ] . Returns ` undefined ` .
@@ -620,7 +616,7 @@ Synchronous readdir(3). Returns an array of filenames excluding `'.'` and
620
616
621
617
## fs.readFile(file[ , options] , callback)
622
618
623
- * ` file ` {String | Integer } filename or file descriptor
619
+ * ` file ` {String} filename
624
620
* ` options ` {Object | String}
625
621
* ` encoding ` {String | Null} default = ` null `
626
622
* ` flag ` {String} default = ` 'r' `
@@ -646,10 +642,6 @@ If `options` is a string, then it specifies the encoding. Example:
646
642
fs .readFile (' /etc/passwd' , ' utf8' , callback);
647
643
```
648
644
649
- Any specified file descriptor has to support reading.
650
-
651
- _ Note: Specified file descriptors will not be closed automatically._
652
-
653
645
## fs.readFileSync(file[ , options] )
654
646
655
647
Synchronous version of [ ` fs.readFile ` ] [ ] . Returns the contents of the ` file ` .
@@ -945,7 +937,7 @@ the end of the file.
945
937
946
938
## fs.writeFile(file, data[ , options] , callback)
947
939
948
- * ` file ` {String | Integer } filename or file descriptor
940
+ * ` file ` {String} filename
949
941
* ` data ` {String | Buffer}
950
942
* ` options ` {Object | String}
951
943
* ` encoding ` {String | Null} default = ` 'utf8' `
@@ -974,14 +966,10 @@ If `options` is a string, then it specifies the encoding. Example:
974
966
fs .writeFile (' message.txt' , ' Hello Node.js' , ' utf8' , callback);
975
967
```
976
968
977
- Any specified file descriptor has to support writing.
978
-
979
969
Note that it is unsafe to use ` fs.writeFile ` multiple times on the same file
980
970
without waiting for the callback. For this scenario,
981
971
` fs.createWriteStream ` is strongly recommended.
982
972
983
- _ Note: Specified file descriptors will not be closed automatically._
984
-
985
973
## fs.writeFileSync(file, data[ , options] )
986
974
987
975
The synchronous version of [ ` fs.writeFile() ` ] [ ] . Returns ` undefined ` .
0 commit comments