pub struct ListDirOptions { /* private fields */ }Expand description
Shared directory traversal policy for collection and paged visiting. Defaults to immediate children only. Collection retains native batching; visiting delivers owned directory pages incrementally through callbacks. Unspecified budgets inherit the client’s resource limits.
Implementations§
Source§impl ListDirOptions
impl ListDirOptions
Sourcepub const fn unlimited() -> ListDirOptions
pub const fn unlimited() -> ListDirOptions
Explicitly disable entry, path-byte and depth limits. This can permit unbounded collection or traversal; prefer finite application budgets.
pub const fn new() -> ListDirOptions
Sourcepub const fn recursive(self, value: bool) -> ListDirOptions
pub const fn recursive(self, value: bool) -> ListDirOptions
Descend into directories, without following entry symlinks.
Sourcepub const fn enter_leave(self, value: bool) -> ListDirOptions
pub const fn enter_leave(self, value: bool) -> ListDirOptions
Emit directory Enter/Leave events, including the root, in
super::VfsiExt::listdir. Otherwise only child Entry events are emitted.
Lifecycle traversal uses bounded directory buffers for depth-first order.
This does not change the page events produced by super::Vfsi::vlistdirs.
Sourcepub const fn sort_by_name(self, value: bool) -> ListDirOptions
pub const fn sort_by_name(self, value: bool) -> ListDirOptions
Sort siblings by filename in super::VfsiExt::listdir. Sorting
requires a complete, bounded directory listing before delivering entries.
Page primitives and collecting helpers retain backend-defined ordering.
Sourcepub const fn follow_symlinks(self, value: bool) -> ListDirOptions
pub const fn follow_symlinks(self, value: bool) -> ListDirOptions
Whether resolving an input directory path may follow symlinks (default:
true). False requires no-follow resolution, including parent components;
backends unable to guarantee it return Unsupported. Recursive entry
symlinks are never traversed regardless of this setting. Buffered
recursive/lifecycle listdir enforces false when reopening directories.
Sourcepub const fn max_entries(self, value: usize) -> ListDirOptions
pub const fn max_entries(self, value: usize) -> ListDirOptions
Shared entry budget across every input root.
Sourcepub const fn max_path_bytes(self, value: usize) -> ListDirOptions
pub const fn max_path_bytes(self, value: usize) -> ListDirOptions
Shared path-byte budget. Recursive visiting also charges root paths.
Sourcepub const fn max_depth(self, value: usize) -> ListDirOptions
pub const fn max_depth(self, value: usize) -> ListDirOptions
Root listing is depth 0; depth 1 also lists immediate subdirectories.
In recursive mode, encountering a directory beyond this limit is an
error unless truncate_at_max_depth(true) is selected. Shallow mode
ignores depth settings and intentionally visits only immediate children.
Finite depths range from 0 through 200; any larger value disables
the depth limit. Entry and path-byte budgets remain in effect.
Sourcepub const fn truncate_at_max_depth(self, value: bool) -> ListDirOptions
pub const fn truncate_at_max_depth(self, value: bool) -> ListDirOptions
Intentionally stop descending at the depth limit instead of failing.
Sourcepub const fn fields(self, value: AttrMask) -> ListDirOptions
pub const fn fields(self, value: AttrMask) -> ListDirOptions
Select metadata returned with directory pages, without per-entry stat calls. Defaults to common stat fields. MODE is always requested for traversal; backends may return additional fields or omit unsupported ones.
pub const fn is_recursive(self) -> bool
pub const fn emits_enter_leave(self) -> bool
pub const fn sorts_by_name(self) -> bool
pub const fn follows_symlinks(self) -> bool
pub fn attributes(self) -> AttrMask
Sourcepub fn entry_limit(self) -> usize
pub fn entry_limit(self) -> usize
Configured entry budget, or the built-in default before client resolution.
Sourcepub fn path_byte_limit(self) -> usize
pub fn path_byte_limit(self) -> usize
Configured path-byte budget, or the built-in default before client resolution.
pub fn depth_limit(self) -> usize
pub const fn truncates_at_depth_limit(self) -> bool
Sourcepub fn resolve(self, limits: ResourceLimits) -> ListDirOptions
pub fn resolve(self, limits: ResourceLimits) -> ListDirOptions
Apply client defaults while preserving explicit zero and unlimited budgets.
Sourcepub fn walk_options(self, limits: ResourceLimits) -> ListDirOptions
pub fn walk_options(self, limits: ResourceLimits) -> ListDirOptions
Resolve a recursive traversal against the client’s defaults.
Sourcepub fn directory_options(self, limits: ResourceLimits) -> ListDirOptions
pub fn directory_options(self, limits: ResourceLimits) -> ListDirOptions
Resolve a shallow listing against the client’s defaults.
Trait Implementations§
Source§impl Clone for ListDirOptions
impl Clone for ListDirOptions
Source§fn clone(&self) -> ListDirOptions
fn clone(&self) -> ListDirOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more