Skip to content

fs: undeprecate existsSync; use access instead of stat for performance

Checklist
  • make -j4 test (UNIX), or vcbuild 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
  1. Improve the performance of existsSync by using access without throwing an ignored exception.
  2. Make exists faster by using access instead of stat (without returning an ignored stat result)
  3. Undeprecate existsSync because there's no alternative method that doesn't throw an exception.

Merge request reports

Loading