Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update fs promisified functions' behaviour
  • Loading branch information
thefourtheye committed Oct 19, 2018
commit 121e1dd077745278f93ec297aa9b58cf690ea57a
10 changes: 10 additions & 0 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3801,6 +3801,11 @@ returned.

The `FileHandle` has to support reading.

**Note:** If one or more `filehandle.read()` calls are made on a file handle
Copy link
Copy Markdown
Member

@ChALkeR ChALkeR Oct 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We deliberately don't use **Note:** anymore afaik?

See #18592.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not official, but there has definitely been an effort to use it much less. In this case, I think It can be dropped and you can just say what you have to say:

If one or more `filehandle.read()` calls are made on a file handle

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I removed the Note now.

and then a `filehandle.readFile()` call is made, the data will be read from
the current position till the end of the file. It doesn't always read from the
beginning of the file.

#### filehandle.stat([options])
<!-- YAML
added: v10.0.0
Expand Down Expand Up @@ -3963,6 +3968,11 @@ The `FileHandle` has to support writing.
It is unsafe to use `filehandle.writeFile()` multiple times on the same file
without waiting for the `Promise` to be resolved (or rejected).

**Note:** If one or more `filehandle.write()` calls are made on a file handle
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

and then a `filehandle.writeFile()` call is made, the data will be written from
the current position till the end of the file. It doesn't always write from the
beginning of the file.

### fsPromises.access(path[, mode])
<!-- YAML
added: v10.0.0
Expand Down