mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-02 06:28:20 +03:00
c0934e1eca
Add directory-related shims This PR adds support for `mkdir`, `rmdir`, `opendir`, `closedir`, and `readdir64_r`. Open directory streams are tracked through a HashMap indexed by pointer locations, which holds directory iterators. Since `DIR` is an opaque type in glibc, I represent them with 1-byte allocations, and then just use their pointers in HashMap lookups. Tests are included to exercise the new functionality.