This commit is contained in:
2023-05-21 13:58:13 +08:00
parent 96b62e94cc
commit 1dd7c21bb6
7 changed files with 23 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
import { exists } from "std/fs/exists.ts";
import { exists, existsSync } from "std/fs/exists.ts";
import { initParser } from "deno_dom/deno-dom-wasm-noinit.ts";
export function sleep(time: number): Promise<undefined> {
@@ -15,6 +15,12 @@ export async function sure_dir(f = "./test") {
}
}
export function sure_dir_sync(f = "./test") {
if (!existsSync(f)) {
Deno.mkdirSync(f, { "recursive": true });
}
}
export enum PromiseStatus {
Pending,
Fulfilled,