Files
manybot/src/utils/file.js
synt-xerror 88a7abba5d –
[repo] desacoplamento e maior coesão
2026-03-13 11:30:34 -03:00

9 lines
259 B
JavaScript

import fs from "fs";
import path from "path";
export function emptyFolder(folder) {
fs.readdirSync(folder).forEach(file => {
const filePath = path.join(folder, file);
if (fs.lstatSync(filePath).isFile()) fs.unlinkSync(filePath);
});
}