Deno.chdir

\color{red}{function} Deno.chdir (directory: string): void

\color{red}{作用}

将当前工作目录更改为指定的路径.

原文: Change the current working directory to the specified path.

\color{red}{参数}

目录: 字符串

原文: directory: string

\color{red}{返回值}

空的.(也可理解为无返回值)

原文: void

\color{red}{示列代码}

Deno.chdir("/home/userA");
Deno.chdir("../userB");
Deno.chdir("C:\\Program Files (x86)\\Java");

\color{red}{其它}

如果找不到目录,则抛出 Deno.errors.NotFound。
如果用户没有访问权限,则抛出 Deno.errors.PermissionDenied。需要 --allow-read。

原文:
Throws Deno.errors.NotFound if directory not found.
Throws Deno.errors.PermissionDenied if the user does not have access rights Requires --allow-read.

原文地址:点此跳转

Deno 目录

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容