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