Deno.close
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.
const file = await Deno.open("my_file.txt");
// do work with "file" object
Deno.close(file.rid);
function
close(
rid: number)
: void;
close(
rid: number)
: void
Parameters
rid: number
Return Type
void
© 2018–2022 the Deno authors
https://doc.deno.land/deno/stable/~/Deno.close