MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / createTempWorkDir

Function createTempWorkDir

packages/oauth/test/helpers.ts:19–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17}
18
19export async function createTempWorkDir(): Promise<TempDirHandle> {
20 const path = await mkdtemp(join(tmpdir(), 'kimi-oauth-test-work-'));
21 let disposed = false;
22 return {
23 path,
24 cleanup: async () => {
25 if (disposed) return;
26 disposed = true;
27 await rm(path, { recursive: true, force: true });
28 },
29 };
30}
31
32export interface SpawnedWorker {
33 readonly id: number;

Calls 1

mkdtempFunction · 0.85

Tested by

no test coverage detected