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: document intention and dangers of fs module Buffer API · nodejs/node@ea8fe04

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
+12Lines changed: 12 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,18 @@ Error: EISDIR, read
9494
<etc.>
9595
```
9696

97+
## Buffer API
98+
99+
`fs` functions support passing and receiving paths as both strings
100+
and Buffers. The latter is intended to make it possible to work with
101+
filesystems that allow for non-UTF-8 filenames. For most typical
102+
uses, working with paths as Buffers will be unnecessary, as the string
103+
API converts to and from UTF-8 automatically.
104+
105+
*Note* that on certain file systems (such as NTFS and HFS+) filenames
106+
will always be encoded as UTF-8. On such file systems, passing
107+
non-UTF-8 encoded Buffers to `fs` functions will not work as expected.
108+
97109
## Class: fs.FSWatcher
98110

99111
Objects returned from `fs.watch()` are of this type.

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.