We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb64630 commit ea8fe04Copy full SHA for ea8fe04
doc/api/fs.markdown
@@ -94,6 +94,18 @@ Error: EISDIR, read
94
<etc.>
95
```
96
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
109
## Class: fs.FSWatcher
110
111
Objects returned from `fs.watch()` are of this type.
0 commit comments