Deno.close (rid: number): void
通过 rid 关闭先前已打开的资源.
例如通过打开或创建文件, 完成文件后关闭,避免泄漏重要资源。
原文: Close the given resource ID (rid) which has been previously opened, such as via opening or creating a file.
Closing a file when you are finished with it is important to avoid leaking resources.
rid : number
原文:
rid : number
void
原文: void
const file = await Deno.open("my_file.txt");
// do work with "file" object
Deno.close(file.rid);
无
No