I heard the other day that it's possible to stream directories in Node. Was wondering which system call that is on Linux (so we can call it from Rust), so decided to dig in! "I wonder how to stream director. Let's check out Node bindings for that!"https://github.com/mafintosh/fs-directory-stream/blob/master/binding.cc#L49 …
"Oh cool, it looks like it calls uv_fs_scandir! Let's see if that's part of libuv!" http://docs.libuv.org/en/v1.x/fs.html
-
-
"Ohey, yeah so that works. I know libuv has a neatly ordered hierarchy, so there should be a linux file corresponding to that. Let's ftake a look in there!" https://github.com/libuv/libuv/blob/master/src/unix/fs.c#L389 …
Show this thread -
"Neat! - So I'm seeing this method called 'scandir'. It doesn't have a namespace or import or anything, but if I recall C doesn't have a module system. Maybe that's the thing we're looking for? Let's google it!" http://man7.org/linux/man-pages/man3/scandir.3.html …
Show this thread -
[the end] So scandir(3) is a thing! - it doesn't appear that the Nix package provides bindings for it yet, so that'smight be something cool to explore in the future!
Show this thread
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.