query method
Resolves to the current status of a permission.
Note, if the permission is already granted, request()
will not prompt
the user again, therefore query()
is only necessary if you are going
to react differently existing permissions without wanting to modify them
or prompt the user to modify them.
const status = await Deno.permissions.query({ name: "read", path: "/etc" });
console.log(status.state);
Implementation
_i2.Future<_i4.PermissionStatus> query(_i2.Object desc) =>
_i3.promiseToFuture(_i3.callMethod(
this,
'query',
[desc],
));