Skip to content

Commit

Permalink
Document outputFile() only supports a file path
Browse files Browse the repository at this point in the history
`fs.writeFile()` supports a buffer or a file descriptor as 1st  argument (`file`), but `fs-extra.outputFile()` does not. Because it sends `file` parameter to `path.dirname()` that requires `String`.
  • Loading branch information
hail2u authored Mar 5, 2017
1 parent e771770 commit 6e0f0cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/outputFile.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# outputFile(file, data, [options], callback)

Almost the same as `writeFile` (i.e. it [overwrites](http://pages.citebite.com/v2o5n8l2f5reb)), except that if the parent directory does not exist, it's created. `options` are what you'd pass to [`fs.writeFile()`](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback).
Almost the same as `writeFile` (i.e. it [overwrites](http://pages.citebite.com/v2o5n8l2f5reb)), except that if the parent directory does not exist, it's created. `file` must be a file path (a buffer or a file descriptor is not allowed). `options` are what you'd pass to [`fs.writeFile()`](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback).

**Sync:** `outputFileSync()`

Expand Down

0 comments on commit 6e0f0cc

Please sign in to comment.