mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-06-06 05:38:44 +08:00
6 lines
285 B
TypeScript
6 lines
285 B
TypeScript
export async function check_file_permissions(path: string) {
|
|
const status1 = await Deno.permissions.request({ name: "read", path });
|
|
const status2 = await Deno.permissions.request({ name: "write", path });
|
|
return status1.state == "granted" && status2.state == "granted";
|
|
}
|