Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional notes on releasing resources when using file streams #493

Merged
merged 9 commits into from
Oct 9, 2024
Prev Previous commit
Next Next commit
Update deploy/api/runtime-fs.md
  • Loading branch information
thisisjofrank authored Oct 9, 2024
commit 849d84b8811bd69037825c8037f3e3e166dcf0bb
10 changes: 3 additions & 7 deletions deploy/api/runtime-fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,11 @@ Deno.serve(handler);

:::note

When you iterate over a file stream as shown below, the file descriptor
will be automatically closed at the end of iteration. There is no need to
manually close the file descriptor.


`const iterator = fd.readable[Symbol.asyncIterator]();`
When you iterate over a file stream as shown below, the file descriptor will be
automatically closed at the end of iteration. There is no need to manually close
the file descriptor: `const iterator = fd.readable[Symbol.asyncIterator]();`

:::
thisisjofrank marked this conversation as resolved.
Show resolved Hide resolved

## Deno.File
thisisjofrank marked this conversation as resolved.
Show resolved Hide resolved

`Deno.File` is a file handle returned from [`Deno.open()`](#denoopen). It can be
Expand Down
Loading