MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / ensureDir

Function ensureDir

apps/desktop/main/paths.ts:385–389  ·  view source on GitHub ↗
(dirPath: string)

Source from the content-addressed store, hash-verified

383 * 确保目录存在
384 */
385export function ensureDir(dirPath: string): void {
386 if (!fs.existsSync(dirPath)) {
387 fs.mkdirSync(dirPath, { recursive: true })
388 }
389}
390
391/**
392 * 确保所有应用目录存在(系统数据 + 用户数据)

Callers 6

ensureDbDirFunction · 0.90
getDbDirFunction · 0.90
ensureAppDirsFunction · 0.70
migrateDirectoryFunction · 0.70
migrateFromLegacyDirFunction · 0.70
migrateToUnifiedDirsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected