@@ -3140,10 +3140,14 @@ for the current process. Additional documentation is available in the
31403140
31413141<!-- YAML
31423142added: v20.0.0
3143+ changes:
3144+ - version: REPLACEME
3145+ pr-url: https://github.com/nodejs/node/pull/65492
3146+ description: The ` reference` argument can be a ` URL ` or a ` Uint8Array ` .
31433147-->
31443148
31453149* ` scope` {string}
3146- * ` reference` {string}
3150+ * ` reference` {string|URL|Uint8Array }
31473151* Returns: {boolean}
31483152
31493153Verifies that the process is able to access the given scope and reference.
@@ -3157,6 +3161,10 @@ permission status, but denied operations will not throw `ERR_ACCESS_DENIED`.
31573161The reference has a meaning based on the provided scope. For example,
31583162the reference when the scope is File System means files and folders.
31593163
3164+ For File System scopes, a ` URL ` reference must use the ` file: ` protocol and is
3165+ converted to a path, while a ` Uint8Array ` reference is treated as the raw bytes
3166+ of a path. Other scopes ignore the reference.
3167+
31603168The available scopes are:
31613169
31623170* ` fs` - All File System
@@ -3166,6 +3174,10 @@ The available scopes are:
31663174* ` env` - Environment variables
31673175* ` openssl .store ` - Loading keys through OpenSSL STORE loaders
31683176* ` worker` - Worker thread spawning operation
3177+ * ` net` - Network operations
3178+ * ` inspector` - Inspector operations
3179+ * ` wasi` - WASI operations
3180+ * ` addon` - Native addon operations
31693181* ` ffi` - Foreign function interface operations
31703182
31713183` ` ` js
@@ -3181,12 +3193,16 @@ process.permission.has('fs.read');
31813193added:
31823194 - v26.3.0
31833195 - v24.20.0
3196+ changes:
3197+ - version: REPLACEME
3198+ pr-url: https://github.com/nodejs/node/pull/65492
3199+ description: The ` reference` argument can be a ` URL ` or a ` Uint8Array ` .
31843200-->
31853201
31863202> Stability: 1.1 - Active Development
31873203
31883204* ` scope` {string}
3189- * ` reference` {string}
3205+ * ` reference` {string|URL|Uint8Array }
31903206
31913207Drops the specified permission from the current process. This operation is
31923208**irreversible** — once a permission is dropped, it cannot be restored through
@@ -3229,6 +3245,7 @@ The available scopes are the same as [`process.permission.has()`][]:
32293245* ` inspector` - Inspector operations
32303246* ` wasi` - WASI operations
32313247* ` addon` - Native addon operations
3248+ * ` ffi` - Foreign function interface operations
32323249
32333250` ` ` js
32343251const fs = require (' node:fs' );
0 commit comments