@aniojs/node-fs-clean-directory
v0.1.3
Published
Clean a directory.
Downloads
303
Readme
@aniojs/node-fs-clean-directory
Clean a directory.
import {cleanDirectory, cleanDirectorySync} from "@aniojs/node-fs-clean-directory"
await cleanDirectory("./dir/")
//
// delete everything except root .gitkeep file
//
await cleanDirectory("./dir/", {
preserve(entry) {
return entry.relative_path === ".gitkeep"
}
})