Description
Affected URL(s)
https://nodejs.org/api/fs.html#fsconstants
Description of the problem
It says the following:
Not every constant will be available on every operating system.
However, this doesn't say anything else about the availability of various constants. In particular, none of the file mode constants are available on Windows and about half of the file type constants are also not present, but the docs don't even so much as hint at this. (I initially thought this to be a bug and filed #41590, so it's definitely confusing.) Part of what makes it non-obvious is the fact many of the various Unix-based constants (both in fs
and elsewhere like with many signals) are shimmed on Windows in terms of corresponding Windows APIs, and so I can't just assume for all of them. (In particular, fs.constants.O_DIRECTORY
is missing from Windows despite fs.opendir
using Windows APIs similar to POSIX's opendir
- that one was very surprising.)
Could the series of tables be updated to include platform availability for each relevant constant?