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 — stream: fix Utf8Stream flush handling · nodejs/node@c27b3ad

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • fs.md
  • lib/internal/streams
    • fast-utf8-stream.js
  • test/parallel
    • test-fastutf8stream-flush-mocks.js
    • test-fastutf8stream-flush-sync.js
    • test-fastutf8stream-flush.js
    • test-fastutf8stream-periodicflush.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/fs.md‎

Copy file name to clipboardExpand all lines: doc/api/fs.md
+9-2Lines changed: 9 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -8417,13 +8417,20 @@ Close the stream gracefully, flushing the internal buffer before closing.
84178417
* `callback` {Function}
84188418
* `err` {Error|null} An error if the flush failed, otherwise `null`.
84198419
8420-
Writes the current buffer to the file if a write was not in progress. Do
8421-
nothing if `minLength` is zero or if it is already writing.
8420+
Writes the current buffer to the file. The callback is invoked after pending
8421+
writes complete and, unless the `fsync` option is enabled, after the data has
8422+
been synchronized with `fs.fsync()`. `fsync` errors indicating that the file
8423+
descriptor does not support synchronization (for example, a pipe or a TTY)
8424+
are ignored.
84228425
84238426
#### `utf8Stream.flushSync()`
84248427
84258428
Flushes the buffered data synchronously. This is a costly operation.
84268429
8430+
If an asynchronous write is in flight when `flushSync()` is called, only the
8431+
data queued after it is written, and it may reach the file before the data
8432+
of the in-flight write.
8433+
84278434
#### `utf8Stream.fsync`
84288435
84298436
* {boolean} Whether the stream is performing a `fs.fsyncSync()` after every

0 commit comments

Comments
0 (0)
You are visitor 01402792 — 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.