MCPcopy Create free account
hub / github.com/microsoft/vscode-cpptools / createDirIfNotExistsSync

Function createDirIfNotExistsSync

Extension/src/common.ts:556–564  ·  view source on GitHub ↗
(filePath: string | undefined)

Source from the content-addressed store, hash-verified

554}
555
556export function createDirIfNotExistsSync(filePath: string | undefined): void {
557 if (!filePath) {
558 return;
559 }
560 const dirPath: string = path.dirname(filePath);
561 if (!checkDirectoryExistsSync(dirPath)) {
562 fs.mkdirSync(dirPath, { recursive: true });
563 }
564}
565
566export function checkFileExistsSync(filePath: string): boolean {
567 try {

Callers

nothing calls this directly

Calls 1

checkDirectoryExistsSyncFunction · 0.85

Tested by

no test coverage detected