Open kripken opened 1 year ago
+1 for supporting as many of these special files as possible on an opt-in basis.
I wonder if maybe we can use the existing FORCE_FILESYSTEM
flag for this. It already means "include the full set of FS support in JS" so maybe it could mean the same for the POSIX side too. People that are ok with the code size downsides of one are likely ok with the other, I'm thinking.
E.g.
test_proc_self_fd
tests for opening the directory/proc/self/fd/
, under which each file descriptor appears as a file. I suspect this is needed pretty rarely, and should probably be an opt-in flag for maximal POSIX support or such.Perhaps the
/tmp/
and/dev/[null|stdout|random..]
files/directories could also be behind such a flag, but those do seem like they are much more commonly used, and we support them atm.