-
-
Notifications
You must be signed in to change notification settings - Fork 143
Closed
Description
Using memfs:
const { fs } = require('memfs');
fs.writeFileSync('/foo', 'hello');
fs.readFileSync('/foo/bar'); // throws ENOENTUsing the builtin fs (on Linux):
const fs = require('node:fs');
fs.writeFileSync('/foo', 'hello');
fs.readFileSync('/foo/bar'); // throws ENOTDIRUsing the builtin fs (on Windows):
const fs = require('node:fs');
fs.writeFileSync('C:/foo', 'hello');
fs.readFileSync('C:/foo/bar'); // throws ENOENTI'm not sure which behavior makes more sense and if this difference is a bug in Node.js, but I think that if !isWin then memfs should also throw ENOTDIR.
Reactions are currently unavailable