Open ry opened 4 years ago
This is implemented: https://doc.deno.land/builtin/stable#Deno.readDir
Actually while the public interface is async streaming, it is internally still non-streaming. Reopening
For context, in the implementation we are collecting the iterator into an array and dispatching it via JSON to the JS call site. Works but semantically not very sound.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
For reference, here is how this is implemented in Node:
uv_fs_opendir()
in libuv calls either opendir()
or FindFirstFileW()
, depending on the operating system. There are similar functions in those files for iterating over the directory and closing the iterator.
probably with async iterator