1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
use crateDirEntry;
use io;
/// Iterator over the entries in a directory.
///
/// This corresponds to [`std::fs::ReadDir`].
///
/// Unlike `std::fs::ReadDir`, this API has a lifetime parameter.
///
/// TODO: The lifetime parameter is here because `ReadDir` needs to return
/// `DirEntry`s which have paths
///
/// Note that there is no `from_std` method, as `std::fs::ReadDir` doesn't
/// provide a way to construct a `ReadDir` without opening directories by
/// ambient paths.
///
/// [`std::fs::ReadDir`]: https://doc.rust-lang.org/std/fs/struct.ReadDir.html
// TODO: impl Debug for ReadDir? But don't expose ReadDir's path...