Permissions class

Deno's permission management API.

The class which provides the interface for the {@linkcode Deno.permissions} global instance and is based on the web platform Permissions API, though some proposed parts of the API which are useful in a server side runtime context were removed or abandoned in the web platform specification which is why it was chosen to locate it in the {@linkcode Deno} namespace instead.

By default, if the stdin/stdout is TTY for the Deno CLI (meaning it can send and receive text), then the CLI will prompt the user to grant permission when an un-granted permission is requested. This behavior can be changed by using the --no-prompt command at startup. When prompting the CLI will request the narrowest permission possible, potentially making it annoying to the user. The permissions APIs allow the code author to request a wider set of permissions at one time in order to provide a better user experience.

Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

Permissions()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited