| 115237 | return ts.getBaseFileName(ts.normalizePath(fileName)); |
| 115238 | } |
| 115239 | function createCachedFileSystemEntries(rootDir, rootDirPath) { |
| 115240 | var _a; |
| 115241 | if (!host.realpath || ts.ensureTrailingDirectorySeparator(toPath(host.realpath(rootDir))) === rootDirPath) { |
| 115242 | var resultFromHost = { |
| 115243 | files: ts.map(host.readDirectory(rootDir, /*extensions*/ undefined, /*exclude*/ undefined, /*include*/ ["*.*"]), getBaseNameOfFileName) || [], |
| 115244 | directories: host.getDirectories(rootDir) || [] |
| 115245 | }; |
| 115246 | cachedReadDirectoryResult.set(ts.ensureTrailingDirectorySeparator(rootDirPath), resultFromHost); |
| 115247 | return resultFromHost; |
| 115248 | } |
| 115249 | // If the directory is symlink do not cache the result |
| 115250 | if ((_a = host.directoryExists) === null || _a === void 0 ? void 0 : _a.call(host, rootDir)) { |
| 115251 | cachedReadDirectoryResult.set(rootDirPath, false); |
| 115252 | return false; |
| 115253 | } |
| 115254 | // Non existing directory |
| 115255 | return undefined; |
| 115256 | } |
| 115257 | /** |
| 115258 | * If the readDirectory result was already cached, it returns that |
| 115259 | * Otherwise gets result from host and caches it. |