1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/test/folder-reset.ts

15 lines
267 B
TypeScript
Raw Normal View History

2023-09-06 18:56:52 +08:00
import * as fs from 'fs';
declare const process: { argv: string[] };
const dir = process.argv[2];
if (fs.existsSync(dir)) {
console.log('deleting folder:' + dir);
fs.rmSync(dir, {recursive: true});
}
console.log('creating folder:' + dir);
fs.mkdirSync(dir);