MCPcopy
hub / github.com/payloadcms/payload / removeFiles

Function removeFiles

test/__helpers/shared/removeFiles.ts:7–15  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

5 * if it exists.
6 */
7export const removeFiles = (dir: string) => {
8 if (!fs.existsSync(dir)) {
9 return
10 }
11
12 fs.readdirSync(dir).forEach((f) => {
13 return fs.rmSync(`${dir}/${f}`, { recursive: true })
14 })
15}

Callers 4

int.spec.tsFile · 0.85
int.spec.tsFile · 0.85
seedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…