0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

Document behaviour of the encoding parameter of fs.writeFile().

Fixes #401.
This commit is contained in:
Ben Noordhuis 2011-07-04 16:26:46 +02:00
parent bcf3c7d31c
commit d6188bdd27

View File

@ -361,7 +361,8 @@ returns a buffer.
### fs.writeFile(filename, data, encoding='utf8', [callback])
Asynchronously writes data to a file, replacing the file if it already exists.
`data` can be a string or a buffer.
`data` can be a string or a buffer. The `encoding` argument is ignored if
`data` is a buffer.
Example: