MCPcopy Index your code
hub / github.com/microsoft/vscode-cpptools / fsStat

Function fsStat

Extension/src/common.ts:504–513  ·  view source on GitHub ↗
(filePath: fs.PathLike)

Source from the content-addressed store, hash-verified

502}
503
504export async function fsStat(filePath: fs.PathLike): Promise<fs.Stats | undefined> {
505 let stats: fs.Stats | undefined;
506 try {
507 stats = await fs.promises.stat(filePath);
508 } catch {
509 // File doesn't exist
510 return undefined;
511 }
512 return stats;
513}
514
515export async function checkPathExists(filePath: string): Promise<boolean> {
516 return !!await fsStat(filePath);

Callers 3

checkPathExistsFunction · 0.85
checkFileExistsFunction · 0.85
checkDirectoryExistsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected