MCPcopy
hub / github.com/postcss/postcss / deleteDir

Function deleteDir

test/previous-map.test.ts:28–40  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

26let map = JSON.stringify(mapObj)
27
28function deleteDir(path: string): void {
29 if (existsSync(path)) {
30 readdirSync(path).forEach(i => {
31 let file = join(path, i)
32 if (lstatSync(file).isDirectory()) {
33 deleteDir(file)
34 } else {
35 unlinkSync(file)
36 }
37 })
38 rmdirSync(path)
39 }
40}
41
42test.after.each(() => {
43 deleteDir(dir)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…