@@ -11,7 +11,7 @@ added: REPLACEME
1111<!-- source_link=lib/vfs.js -->
1212
1313The ` node:vfs ` module provides an in-memory virtual file system with an
14- ` fs ` -like API. It is useful for tests, fixtures, embedded assets, and other
14+ ` node: fs` -like API. It is useful for tests, fixtures, embedded assets, and other
1515scenarios where you need a self-contained file system without touching the
1616actual file-system.
1717
@@ -112,12 +112,12 @@ added: REPLACEME
112112
113113` true ` when the underlying provider is read-only.
114114
115- ### File system methods
115+ ### APIs
116116
117117` VirtualFileSystem ` implements the following methods, with the same
118118signatures as their [ ` node:fs ` ] [ ] counterparts:
119119
120- #### Synchronous methods
120+ #### Synchronous API
121121
122122* ` existsSync(path) `
123123* ` statSync(path[, options]) `
@@ -151,14 +151,14 @@ signatures as their [`node:fs`][] counterparts:
151151* Streams: ` createReadStream ` , ` createWriteStream `
152152* Watchers: ` watch ` , ` watchFile ` , ` unwatchFile `
153153
154- #### Callback-style asynchronous methods
154+ #### Callback API
155155
156156` readFile ` , ` writeFile ` , ` stat ` , ` lstat ` , ` readdir ` , ` realpath ` , ` readlink ` ,
157157` access ` , ` open ` , ` close ` , ` read ` , ` write ` , ` rm ` , ` fstat ` , ` truncate ` ,
158158` ftruncate ` , ` link ` , ` mkdtemp ` , ` opendir ` . Each takes a Node.js-style
159- callback ` (err, ...result) ` .
159+ callback ` (err, ...result) => {} ` .
160160
161- #### Promise methods
161+ #### Promise API
162162
163163` vfs.promises ` exposes the promise-based variants:
164164
@@ -189,7 +189,10 @@ added: REPLACEME
189189The base class for all VFS providers. Subclasses implement the essential
190190primitives (` open ` , ` stat ` , ` readdir ` , ` mkdir ` , ` rmdir ` , ` unlink ` ,
191191` rename ` , ...) and inherit default implementations of the derived
192- methods (` readFile ` , ` writeFile ` , ` exists ` , ` copyFile ` , ` access ` , ...).
192+ The base class for all VFS providers. Subclasses implement the essential
193+ primitives (such as ` open ` , ` stat ` , ` readdir ` , ` mkdir ` , ` rmdir ` , ` unlink ` ,
194+ ` rename ` , etc.) and inherit default implementations of the derived
195+ methods (such as ` readFile ` , ` writeFile ` , ` exists ` , ` copyFile ` , ` access ` , etc.).
193196
194197### Capability flags
195198
@@ -254,7 +257,7 @@ myVfs.writeFileSync('/x.txt', 'fail'); // throws EROFS
254257added: REPLACEME
255258-->
256259
257- A provider that wraps a real file system directory and exposes its
260+ A provider that wraps a directory (i.e. one on the actual file system) and exposes its
258261contents through the VFS API. All VFS paths are resolved relative to
259262the root and verified to stay inside it; symbolic links resolving
260263outside the root are rejected.
@@ -265,7 +268,7 @@ outside the root are rejected.
265268added: REPLACEME
266269-->
267270
268- * ` rootPath ` {string} The absolute file system path to use as the root.
271+ * ` rootPath ` {string} The absolute file- system path to use as the root.
269272 Must be a non-empty string.
270273
271274``` cjs
0 commit comments