MCPcopy Index your code
hub / github.com/CommandCodeAI/BaseAI / createDirIfNotExists

Function createDirIfNotExists

packages/baseai/src/init/index.ts:123–131  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

121}
122
123async function createDirIfNotExists(dir: string): Promise<boolean> {
124 try {
125 await fs.access(dir);
126 return false; // Directory already exists
127 } catch {
128 await fs.mkdir(dir, { recursive: true });
129 return true; // Directory was created
130 }
131}
132
133async function checkFileExists(filePath: string): Promise<boolean> {
134 try {

Callers 1

createBaseAIDirectoriesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected