PHP 8.2.30
Preview: rm.js Size: 481 B
/opt/alt/alt-nodejs18/root/usr/lib/node_modules/npm/node_modules/cacache/lib/content/rm.js

'use strict'

const fs = require('fs/promises')
const contentPath = require('./path')
const { hasContent } = require('./read')

module.exports = rm

async function rm (cache, integrity) {
  const content = await hasContent(cache, integrity)
  // ~pretty~ sure we can't end up with a content lacking sri, but be safe
  if (content && content.sri) {
    await fs.rm(contentPath(cache, content.sri), { recursive: true, force: true })
    return true
  } else {
    return false
  }
}

Directory Contents

Dirs: 0 × Files: 4

Name Size Perms Modified Actions
737 B lrw-r--r-- 2026-03-09 09:08:36
Edit Download
4.18 KB lrw-r--r-- 2026-03-09 09:08:36
Edit Download
481 B lrw-r--r-- 2026-03-09 09:08:36
Edit Download
5.61 KB lrw-r--r-- 2026-03-09 09:08:36
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).