MCPcopy
hub / github.com/RimoChan/match-you / deleteAll

Function deleteAll

stepmother.js:21–32  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

19]
20
21const deleteAll = (path) => {
22 if (fs.existsSync(path)) {
23 const state = fs.lstatSync(path)
24 if (state.isDirectory()) {
25 fs.rmdirSync(path, {
26 recursive: true
27 })
28 } else {
29 fs.rmSync(path)
30 }
31 }
32}
33
34removeItem.forEach((filename) => {
35 const filepath = path.resolve(removeDir, filename)

Callers 1

stepmother.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected