mirror of
https://github.com/denoland/deno.git
synced 2025-07-23 05:05:08 +00:00
stabilize Deno.cwd and require --allow-read (#5068)
This commit is contained in:
parent
191c59a591
commit
6c02b061ce
8 changed files with 23 additions and 59 deletions
14
cli/js/lib.deno.ns.d.ts
vendored
14
cli/js/lib.deno.ns.d.ts
vendored
|
@ -144,6 +144,20 @@ declare namespace Deno {
|
|||
*/
|
||||
export function chdir(directory: string): void;
|
||||
|
||||
/**
|
||||
* Return a string representing the current working directory.
|
||||
*
|
||||
* If the current directory can be reached via multiple paths (due to symbolic
|
||||
* links), `cwd()` may return any one of them.
|
||||
*
|
||||
* const currentWorkingDirectory = Deno.cwd();
|
||||
*
|
||||
* Throws `Deno.errors.NotFound` if directory not available.
|
||||
*
|
||||
* Requires --allow-read
|
||||
*/
|
||||
export function cwd(): string;
|
||||
|
||||
export enum SeekMode {
|
||||
Start = 0,
|
||||
Current = 1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue