We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 206e49a commit b732fcfCopy full SHA for b732fcf
src/filesystem.ts
@@ -33,6 +33,10 @@ export interface ReadJsonAsync {
33
}
34
35
export function fileExistsSync(path: string): boolean {
36
+ // If the file doesn't exist, avoid throwing an exception over the native barrier for every miss
37
+ if (!fs.existsSync(path)) {
38
+ return false;
39
+ }
40
try {
41
const stats = fs.statSync(path);
42
return stats.isFile();
0 commit comments