(path, entryKind)
| 7435 | return ts.matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames, process.cwd(), depth, getAccessibleFileSystemEntries, realpath); |
| 7436 | } |
| 7437 | function fileSystemEntryExists(path, entryKind) { |
| 7438 | // Since the error thrown by fs.statSync isn't used, we can avoid collecting a stack trace to improve |
| 7439 | // the CPU time performance. |
| 7440 | var originalStackTraceLimit = Error.stackTraceLimit; |
| 7441 | Error.stackTraceLimit = 0; |
| 7442 | try { |
| 7443 | var stat = statSync(path); |
| 7444 | if (!stat) { |
| 7445 | return false; |
| 7446 | } |
| 7447 | switch (entryKind) { |
| 7448 | case 0 /* FileSystemEntryKind.File */: return stat.isFile(); |
| 7449 | case 1 /* FileSystemEntryKind.Directory */: return stat.isDirectory(); |
| 7450 | default: return false; |
| 7451 | } |
| 7452 | } |
| 7453 | catch (e) { |
| 7454 | return false; |
| 7455 | } |
| 7456 | finally { |
| 7457 | Error.stackTraceLimit = originalStackTraceLimit; |
| 7458 | } |
| 7459 | } |
| 7460 | function fileExists(path) { |
| 7461 | return fileSystemEntryExists(path, 0 /* FileSystemEntryKind.File */); |
| 7462 | } |
no test coverage detected
searching dependent graphs…