summaryrefslogtreecommitdiff
path: root/test/test_dir.rs
AgeCommit message (Collapse)Author
2021-03-21illumos and Solaris supportJason King
Co-authored-by: Dominik Hassler <hadfl@omnios.org> Co-authored-by: Joshua M. Clulow <josh@sysmgr.org>
2021-02-15Dir: Implement `IntoIterator` for `Dir`William Manley
This is useful to allow returning an iterator based on a directory iterator without needing a self-referential struct.
2020-05-31Convert the crate to edition 2018Alan Somers
2018-09-03new dir moduleScott Lamb
This is a lower-level interface than `std::fs::ReadDir`. Notable differences: * can be opened from a file descriptor (as returned by `openat`, perhaps before knowing if the path represents a file or directory). Uses `fdopendir` for this, available on all Unix platforms as of rust-lang/libc#1018. * implements `AsRawFd`, so it can be passed to `fstat`, `openat`, etc. * can be iterated through multiple times without closing and reopening the file descriptor. Each iteration rewinds when finished. * returns entries for `.` (current directory) and `..` (parent directory). * returns entries' names as a `CStr` (no allocation or conversion beyond whatever libc does).