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

Function removeTempDir

packages/node-sdk/test/session-runtime-helpers.ts:144–159  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

142}
143
144async function removeTempDir(dir: string): Promise<void> {
145 for (let attempt = 0; attempt < 10; attempt += 1) {
146 try {
147 await rm(dir, { recursive: true, force: true });
148 return;
149 } catch (error) {
150 const code = (error as NodeJS.ErrnoException).code;
151 if (code !== 'ENOTEMPTY' && code !== 'EBUSY' && code !== 'EPERM') {
152 throw error;
153 }
154 await delay(10);
155 }
156 }
157
158 await rm(dir, { recursive: true, force: true });
159}

Callers 1

removeTempDirsFunction · 0.70

Calls 1

delayFunction · 0.85

Tested by

no test coverage detected