Clear-folder: clears files/folders with rules
- see
__tests__/clearfolder.spec.ts
file
const clearRules: ClearRule[] = [
KEEP(m.folder('toKeep')),
DEL(m.folder('toDelWithKeep'), [
KEEP(m.folder('toKeep')),
]),
DEL(m.folder('toDelWithNestedKeep'), [
KEEP(m.nested(m.file('toSurvive.txt'))),
])
]
await clearFs({
fullPath: fixturePath,
clearRules,
action: ACTIONS.DELETE,
})
Do whatever you like (copy/fork/resell as-is😒/...) , except:
- sue me for bugs
- forget to link to this repo as the original / attribute