Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function cleanFolder(folderName: string) {
try {
await fsAsPromised.lstat(folderName);
await deleteDir(folderName);
return mkdirp.sync(folderName);
} catch (e) {
return mkdirp.sync(folderName);
}
}
export async function cleanFolder(folderName: string) {
try {
await fsAsPromised.lstat(folderName);
await deleteDir(folderName);
return mkdirp.sync(folderName);
} catch (e) {
return mkdirp.sync(folderName);
}
}