MCPcopy Create free account
hub / github.com/PatrickSys/codebase-context / createTempDir

Function createTempDir

tests/index-migration-atomic-swap.test.ts:29–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27const STAGING_DIRNAME = '.staging';
28
29async function createTempDir(): Promise<string> {
30 const baseDir = path.join(process.cwd(), '.test-temp');
31 await fs.mkdir(baseDir, { recursive: true });
32 const tempDir = path.join(baseDir, `atomic-swap-test-${randomUUID()}`);
33 await fs.mkdir(tempDir, { recursive: true });
34 return tempDir;
35}
36
37async function cleanupDir(dir: string): Promise<void> {
38 try {

Calls

no outgoing calls

Tested by

no test coverage detected