GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: clarify that fs streams expect blocking fd · nodejs/node@3f4409e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • fs.markdown
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/fs.markdown‎

Copy file name to clipboardExpand all lines: doc/api/fs.markdown
+4-1Lines changed: 4 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@ start at 0. The `encoding` can be any one of those accepted by [Buffer][].
307307

308308
If `fd` is specified, `ReadStream` will ignore the `path` argument and will use
309309
the specified file descriptor. This means that no `open` event will be emitted.
310+
Note that `fd` should be blocking; non-blocking `fd`s should be passed to
311+
`net.Socket`.
310312

311313
If `autoClose` is false, then the file descriptor won't be closed, even if
312314
there's an error. It is your responsibility to close it and make sure
@@ -341,7 +343,8 @@ default mode `w`. The `defaultEncoding` can be any one of those accepted by [Buf
341343

342344
Like `ReadStream` above, if `fd` is specified, `WriteStream` will ignore the
343345
`path` argument and will use the specified file descriptor. This means that no
344-
`open` event will be emitted.
346+
`open` event will be emitted. Note that `fd` should be blocking; non-blocking
347+
`fd`s should be passed to `net.Socket`.
345348

346349
If `options` is a string, then it specifies the encoding.
347350

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.