fs: undeprecate existsSync; use access instead of stat for performance
Checklist
-
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
fs
Description of change
- Improve the performance of
existsSync
by usingaccess
without throwing an ignored exception. - Make
exists
faster by usingaccess
instead ofstat
(without returning an ignored stat result) - Undeprecate
existsSync
because there's no alternative method that doesn't throw an exception.