mirror of
https://github.com/denoland/deno.git
synced 2025-09-29 21:54:48 +00:00
Cleanup comments and internal variables (#4205)
This commit is contained in:
parent
809019dc6e
commit
6cd46fa3ef
25 changed files with 681 additions and 572 deletions
|
@ -2,19 +2,25 @@
|
|||
import { sendSync } from "./dispatch_json.ts";
|
||||
|
||||
/**
|
||||
* `cwd()` 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.
|
||||
* throws `NotFound` exception if directory not available
|
||||
* **UNSTABLE**: maybe needs permissions.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Throws `Deno.errors.NotFound` if directory not available.
|
||||
*/
|
||||
export function cwd(): string {
|
||||
return sendSync("op_cwd");
|
||||
}
|
||||
|
||||
/**
|
||||
* `chdir()` Change the current working directory to path.
|
||||
* throws `NotFound` exception if directory not available
|
||||
* **UNSTABLE**: maybe needs permissions.
|
||||
*
|
||||
* Change the current working directory to the specified path.
|
||||
*
|
||||
* Throws `Deno.errors.NotFound` if directory not available.
|
||||
*/
|
||||
export function chdir(directory: string): void {
|
||||
sendSync("op_chdir", { directory });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue