MCPcopy
hub / github.com/Swatinem/rust-cache / rm

Function rm

src/cleanup.ts:296–306  ·  view source on GitHub ↗
(parent: string, dirent: fs.Dirent)

Source from the content-addressed store, hash-verified

294}
295
296async function rm(parent: string, dirent: fs.Dirent) {
297 try {
298 const fileName = path.join(parent, dirent.name);
299 core.debug(`deleting "${fileName}"`);
300 if (dirent.isFile()) {
301 await fs.promises.unlink(fileName);
302 } else if (dirent.isDirectory()) {
303 await io.rmRF(fileName);
304 }
305 } catch {}
306}
307
308async function rmRF(dirName: string) {
309 core.debug(`deleting "${dirName}"`);

Callers 6

cleanTargetDirFunction · 0.85
cleanBinFunction · 0.85
cleanRegistryFunction · 0.85
cleanRegistryIndexCacheFunction · 0.85
cleanGitFunction · 0.85
rmExceptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected