Deno.create
create
-
create(path: string): Promise<File>
-
创建文件并异步返回一个
Deno.File
实例,如果文件已存在则进行覆盖。Creates a file if none exists or truncates an existing file and resolves to an instance of
Deno.File
.const file = await Deno.create("/foo/bar.txt");
需要
allow-read
和allow-write
权限。Requires
allow-read
andallow-write
permissions.
参数
- ##### path: string