MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / convertDirectoryToZipInPlace

Function convertDirectoryToZipInPlace

src/utils/plugins/zipCache.ts:371–378  ·  view source on GitHub ↗
(
  dirPath: string,
  zipPath: string,
)

Source from the content-addressed store, hash-verified

369 * same sequence; getting it wrong (non-atomic write, forgetting rm) corrupts cache.
370 */
371export async function convertDirectoryToZipInPlace(
372 dirPath: string,
373 zipPath: string,
374): Promise<void> {
375 const zipData = await createZipFromDirectory(dirPath)
376 await atomicWriteToZipCache(zipPath, zipData)
377 await rm(dirPath, { recursive: true, force: true })
378}
379
380/**
381 * Get the relative path for a marketplace JSON file within the zip cache.

Callers 2

cacheAndRegisterPluginFunction · 0.85

Calls 3

createZipFromDirectoryFunction · 0.85
atomicWriteToZipCacheFunction · 0.85
rmFunction · 0.85

Tested by

no test coverage detected