mirror of
https://github.com/denoland/deno.git
synced 2024-12-27 01:29:14 -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" });
|