Deno.create

\color{red}{function} Deno.create (path: string | URL): Promise<file>

\color{red}{作用}

如果不存在则创建文件,或者将其截断并解析为Deno.File的实例。

原文: Creates a file if none exists or truncates an existing file and resolves to an instance of Deno.File.

\color{red}{参数}

path : string | URL

原文:
path : string | URL

\color{red}{返回值}

Promise<file>

原文: Promise<file>

\color{red}{示列代码}

const file = await Deno.create("/foo/bar.txt");

\color{red}{其它}

需要提供 allow-read 和 allow-write 权限。

原文:
Requires allow-read and allow-write permission.

原文地址:点此跳转

Deno 目录

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

推荐阅读更多精彩内容