mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
docs(fs): clarify permissions requirements for exists[Sync]()
(#5983)
* docs(fs): clarify permissions requirements for `exists[Sync]()` * work
This commit is contained in:
parent
381d70dcd1
commit
f84e735a9a
24
fs/exists.ts
24
fs/exists.ts
@ -36,7 +36,8 @@ export interface ExistsOptions {
|
||||
* @see {@link https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use} for
|
||||
* more information on the time-of-check to time-of-use bug.
|
||||
*
|
||||
* Requires `--allow-read` and `--allow-sys` permissions.
|
||||
* Requires `--allow-read` permissions, and in some cases, `--allow-sys`
|
||||
* permissions if `options.isReadable` is `true`.
|
||||
*
|
||||
* @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
|
||||
* for more information on Deno's permissions system.
|
||||
@ -72,6 +73,9 @@ export interface ExistsOptions {
|
||||
* ```
|
||||
*
|
||||
* @example Check if a path is readable
|
||||
*
|
||||
* Requires `--allow-sys` permissions in some cases.
|
||||
*
|
||||
* ```ts no-eval
|
||||
* import { exists } from "@std/fs/exists";
|
||||
*
|
||||
@ -96,6 +100,9 @@ export interface ExistsOptions {
|
||||
* ```
|
||||
*
|
||||
* @example Check if a path is a readable directory
|
||||
*
|
||||
* Requires `--allow-sys` permissions in some cases.
|
||||
*
|
||||
* ```ts no-eval
|
||||
* import { exists } from "@std/fs/exists";
|
||||
*
|
||||
@ -104,6 +111,9 @@ export interface ExistsOptions {
|
||||
* ```
|
||||
*
|
||||
* @example Check if a path is a readable file
|
||||
*
|
||||
* Requires `--allow-sys` permissions in some cases.
|
||||
*
|
||||
* ```ts no-eval
|
||||
* import { exists } from "@std/fs/exists";
|
||||
*
|
||||
@ -166,7 +176,8 @@ export async function exists(
|
||||
* @see {@link https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use} for
|
||||
* more information on the time-of-check to time-of-use bug.
|
||||
*
|
||||
* Requires `--allow-read` and `--allow-sys` permissions.
|
||||
* Requires `--allow-read` permissions, and in some cases, `--allow-sys`
|
||||
* permissions if `options.isReadable` is `true`.
|
||||
*
|
||||
* @see {@link https://docs.deno.com/runtime/manual/basics/permissions#file-system-access}
|
||||
* for more information on Deno's permissions system.
|
||||
@ -201,6 +212,9 @@ export async function exists(
|
||||
* ```
|
||||
*
|
||||
* @example Check if a path is readable
|
||||
*
|
||||
* Requires `--allow-sys` permissions in some cases.
|
||||
*
|
||||
* ```ts no-eval
|
||||
* import { existsSync } from "@std/fs/exists";
|
||||
*
|
||||
@ -225,6 +239,9 @@ export async function exists(
|
||||
* ```
|
||||
*
|
||||
* @example Check if a path is a readable directory
|
||||
*
|
||||
* Requires `--allow-sys` permissions in some cases.
|
||||
*
|
||||
* ```ts no-eval
|
||||
* import { existsSync } from "@std/fs/exists";
|
||||
*
|
||||
@ -233,6 +250,9 @@ export async function exists(
|
||||
* ```
|
||||
*
|
||||
* @example Check if a path is a readable file
|
||||
*
|
||||
* Requires `--allow-sys` permissions in some cases.
|
||||
*
|
||||
* ```ts no-eval
|
||||
* import { existsSync } from "@std/fs/exists";
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user