We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5047006 commit 818f084Copy full SHA for 818f084
doc/api/fs.md
@@ -1701,6 +1701,11 @@ this API: [`fs.exists()`][].
1701
parameter to `fs.exists()` accepts parameters that are inconsistent with other
1702
Node.js callbacks. `fs.existsSync()` does not use a callback.
1703
1704
+```js
1705
+if (fs.existsSync('/etc/passwd')) {
1706
+ console.log('The file exists.');
1707
+}
1708
+```
1709
1710
## fs.fchmod(fd, mode, callback)
1711
<!-- YAML
0 commit comments