3 ms·
I don't even have downvote privileges yet! I was unaware of the getdents issue - thanks. However, it is most definitely slower than ls, because I've only teste
by cytzol 12y ago
I don't even have downvote privileges yet!
I was unaware of the getdents issue - thanks. However, it is most definitely slower than ls, because I've only tested it on large directories, rather than using it with large directories daily, so I haven't found places to optimise it quite yet. I'm not sure if using Rust will let me avoid that buffer issue, as right now I'm just using the function provided in its standard library.
- fsniper 12y agoNope, If you are using libc readdir, gettdents issue is unavoidable.
- geofft 12y agoYou can call the raw system call using, for example, kmc's syscall! macro: https://github.com/kmcallister/syscall.rs https://github.com/kmcallister/syscall.rs I do wonder if it's worth it eventually for libstd to speak the syscall interface directly, instead of going through another language's standard library (and whatever bugs or design decisions that standard library might have).