Add a helper function

This commit is contained in:
AnnAngela-work
2022-03-02 15:48:08 +08:00
parent 281fe365c0
commit 783173fd1f
6 changed files with 37 additions and 12 deletions

View File

@@ -1,9 +1,10 @@
const fs = require("fs");
const rmSync = require("../extra/fs-rmSync.js");
const path = "./data/test";
if (fs.existsSync(path)) {
fs.rmdirSync(path, {
rmSync(path, {
recursive: true,
});
}