From f9ebcb7c00faf1290565630f14c93a9c7ab51e51 Mon Sep 17 00:00:00 2001 From: Scott Lamb Date: Thu, 7 Jun 2018 13:18:14 -0700 Subject: 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). --- test/test.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'test/test.rs') diff --git a/test/test.rs b/test/test.rs index da55235a..a72dc44a 100644 --- a/test/test.rs +++ b/test/test.rs @@ -10,6 +10,7 @@ extern crate rand; extern crate tempfile; mod sys; +mod test_dir; mod test_fcntl; #[cfg(any(target_os = "dragonfly", target_os = "freebsd", -- cgit v1.2.3