mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-26 13:26:22 +00:00
13 lines
307 B
TypeScript
13 lines
307 B
TypeScript
import os from "os"
|
|
import { rimraf, RimrafAsyncOptions } from "rimraf"
|
|
|
|
export async function rmrf(
|
|
path: string | string[],
|
|
opt?: RimrafAsyncOptions | undefined,
|
|
): Promise<boolean> {
|
|
if (os.platform() == "win32") {
|
|
return rimraf.windows(path, opt)
|
|
} else {
|
|
return rimraf(path, opt)
|
|
}
|
|
}
|