Skip to main content

Module listing

Module listing 

Source
Available on crate feature listing only.
Expand description

Directory listing and recursive traversal.

Enabled by the listing feature (default).

§Depth model

Depth is measured the same way as walkdir and crate::discovery::DiscoveryOptions:

  • Depth 0 — the walk root itself
  • Depth 1 — immediate children of the root
  • Depth nn path components below the root
recursivemax_depthEffect
falseignoredOnly immediate children (depth 1). Optionally include root via include_root.
trueNoneUnlimited depth
trueSome(n)Walkdir max_depth = n (root is depth 0)

Prefer list when you need sorted results. Prefer walk for streaming (unsorted walk order).

Structs§

ListOptions
Options controlling directory listing and traversal.
WalkIter
Streaming iterator produced by walk.

Functions§

list
List filesystem entries under root according to options.
list_asyncasync
Async wrapper around list using spawn_blocking.
walk
Stream filesystem entries under root in walk order.