MCPcopy Create free account
hub / github.com/github/docs / removeFiles

Function removeFiles

script/enterprise-server-deprecations/remove-static-files.js:54–63  ·  view source on GitHub ↗
(dir, baseName, supportedVersions)

Source from the content-addressed store, hash-verified

52})
53
54function removeFiles(dir, baseName, supportedVersions) {
55 fs.readdirSync(dir)
56 .filter((file) => file.includes(baseName))
57 .filter((file) => supportedVersions.every((version) => !file.includes(version)))
58 .forEach((file) => {
59 const fullPath = path.join(dir, file)
60 console.log(`removing ${fullPath}`)
61 rimraf.sync(fullPath)
62 })
63}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected