-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reading a directory #10962
Comments
Looks like a doc issue? The docs of
// OS X and Linux
fs.open('<directory>', 'a+', (err, fd) => {
// => [Error: EISDIR: illegal operation on a directory, open <directory>]
});
// Windows and FreeBSD
fs.open('<directory>', 'a+', (err, fd) => {
// => null, <fd>
}); |
Dumb question - So what exactly should be done about this? 😅 To me it seems the docs already explain the differences quite explicitly, so I don't see what is to be done? |
Definitely not a dumb question. I guess the two options are “close this as working as expected” or “add a note to the readFile(Sync) documentation too”, and I’d personally be okay with either. |
@addaleax Would pull request 12800 seem alright ? |
Updated fs.md stating fs.readFileAsync is platform specific Refs: nodejs#10962
* Updated fs.md stating fs.readFileAsync is platform specific * Fix formatting of `note`s PR-URL: nodejs#12800 Refs: nodejs#10962 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Yes, I'll close. Cheers. |
If you try to read a directory, the behavior will be platform specific:
Is it ok? I expected the same result on all platforms
The text was updated successfully, but these errors were encountered: