Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

翻译 Deno.chdir #22

Merged
merged 1 commit into from
Apr 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions lib.deno.ns.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,18 +408,16 @@ declare namespace Deno {
export function cwd(): string;

/**
* **UNSTABLE**: Currently under evaluation to decide if explicit permission is
* required to change the current working directory.
* **不稳定**: 更改当前工作目录是否需要明确的权限,目前正在评估中。
*
* Change the current working directory to the specified path.
* 将当前工作目录更改为指定路径。
*
* Deno.chdir("/home/userA");
* Deno.chdir("../userB");
* Deno.chdir("C:\\Program Files (x86)\\Java");
*
* Throws `Deno.errors.NotFound` if directory not found.
* Throws `Deno.errors.PermissionDenied` if the user does not have access
* rights
* 如果目录未被找到,则抛出 `Deno.errors.NotFound` 。
* 如果用户没有访问权限,则抛出 `Deno.errors.PermissionDenied` 。
*/
export function chdir(directory: string): void;

Expand Down