mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-06-06 05:38:44 +08:00
Update
This commit is contained in:
8
utils.ts
8
utils.ts
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user