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 60e99e4 commit 49ef465Copy full SHA for 49ef465
5 files changed
doc/api/fs.md
@@ -225,6 +225,10 @@ fs.readFileSync(new URL('file://hostname/p/a/t/h/file'));
225
// - WHATWG file URLs convert to absolute path
226
// file:///tmp/hello => /tmp/hello
227
fs.readFileSync(new URL('file:///tmp/hello'));
228
+
229
+// WHATWG file URLs must not end with forward slash `/`
230
+fs.readFileSync(new URL('file:///c/p/a/t/h/file/'));
231
+// Error [ERR_INVALID_FILE_URL_PATH]: File URL path cannot be a directory
232
```
233
234
A `file:` URL having encoded slash characters will result in a throw on all
0 commit comments