@kontent-ai/core-sdk
Version:
Core package with shared / common functionality for Kontent.ai SDKs
13 lines (10 loc) • 315 B
text/typescript
import { rmSync } from "node:fs";
import chalk from "chalk";
export function deleteFolderRecursive(path: string): void {
console.log(`Deleting existing folder '${chalk.yellow(path)}'`);
rmSync(path, {
recursive: true,
force: true,
});
console.log(`Folder '${chalk.yellow(path)}' deleted successfully`);
}