MCPcopy Create free account
hub / github.com/CodeFox-Repo/codefox / ensureDir

Function ensureDir

frontend/src/config/common-path.ts:10–15  ·  view source on GitHub ↗
(dirPath: string)

Source from the content-addressed store, hash-verified

8
9// Utility function to ensure a directory exists
10const ensureDir = (dirPath: string): string => {
11 if (!existsSync(dirPath)) {
12 mkdirSync(dirPath, { recursive: true });
13 }
14 return dirPath;
15};
16
17// ----------- We need path traverse Protection after we decide how we read and store the file !!!!!!!!!!!!! ------------
18// -------------------------------------------------------------------------------------------------------------

Callers 5

getFrontendRootDirFunction · 0.70
getCacheDirFunction · 0.70
getUserCacheDirFunction · 0.70
getProjectCacheDirFunction · 0.70
getProjectContentDirFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected