mirror of
https://github.com/denoland/deno.git
synced 2024-11-27 16:10:57 -05:00
6 lines
284 B
TypeScript
6 lines
284 B
TypeScript
|
const status = await Deno.permissions.query({ name: "read", path: "foo" });
|
||
|
console.log(status.state);
|
||
|
status.onchange = () => console.log(status.state);
|
||
|
await Deno.permissions.request({ name: "read", path: "foo" }); // y
|
||
|
await Deno.permissions.revoke({ name: "read", path: "foo" });
|