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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! Recursive directory walker (FR-026/FR-027/FR-028, AD-014, HINT-002).
//!
//! Wraps `walkdir` with the required ordering policy:
//! - `contents_first(true)` — leaves-up so parent renames don't invalidate child paths
//! - `follow_links(false)` — symlinks-to-directories are NOT descended (FR-027)
//!
//! Filters out non-regular non-directory file types (sockets, char/block
//! devices, named pipes) per FR-028.
use ;
use ;
/// One entry yielded from the walker.
/// Recursively walk `root` depth-first leaves-up.
///
/// Returns a `Vec<WalkEntry>` of regular files and directories under `root`.
/// Symlinks-to-directories are NOT followed (FR-027); non-regular/non-directory
/// entries (sockets/char/block/FIFOs) are silently filtered out (FR-028).
///
/// The walker collects into a `Vec` rather than streaming because the planner
/// needs the full per-directory list to compute collision-safe targets in one
/// pass.