diff options
author | Scott Lamb <slamb@slamb.org> | 2018-06-07 13:18:14 -0700 |
---|---|---|
committer | Scott Lamb <slamb@slamb.org> | 2018-09-03 17:04:57 -0700 |
commit | f9ebcb7c00faf1290565630f14c93a9c7ab51e51 (patch) | |
tree | 85fd74027d129c4a46aa9af247a9fb130cccd141 /test/test_mount.rs | |
parent | 82b51a2b5dd9b5567d4cf15f4bf931d9e39528d1 (diff) | |
download | nix-f9ebcb7c00faf1290565630f14c93a9c7ab51e51.zip |
new dir module
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).
Diffstat (limited to 'test/test_mount.rs')
0 files changed, 0 insertions, 0 deletions