Files
NapCatQQ/.pnpm-store/v3/files/24/5592934cfc7b5e8dc0708700663974fae50007175b44b284c32689041d1b60672718fdd9207b8084704ab3bc09d763334b9e2c9ea8eb075108b935cfe0894b
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

21 lines
493 B
Plaintext

'use strict'
const util = require('util')
const contentPath = require('./path')
const { hasContent } = require('./read')
const rimraf = util.promisify(require('rimraf'))
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 rimraf(contentPath(cache, content.sri))
return true
} else {
return false
}
}