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. Require no symlink components when false; metadata’s final-component option has a deliberately different name.
use vfsi_core::api::ListDirOptions;
ListDirOptions::new().with_follow_symlinks(false);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 with_recursive(self, value: bool) -> ListDirOptions
pub const fn with_recursive(self, value: bool) -> ListDirOptions
Descend into directories, without following entry symlinks.
Sourcepub const fn with_allow_symlink_components(self, value: bool) -> ListDirOptions
pub const fn with_allow_symlink_components(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 with_max_entries(self, value: usize) -> ListDirOptions
pub const fn with_max_entries(self, value: usize) -> ListDirOptions
Shared entry budget across every input root.
Sourcepub const fn with_max_path_bytes(self, value: usize) -> ListDirOptions
pub const fn with_max_path_bytes(self, value: usize) -> ListDirOptions
Shared path-byte budget. Recursive visiting also charges root paths.
Sourcepub const fn with_max_depth(self, value: DepthLimit) -> ListDirOptions
pub const fn with_max_depth(self, value: DepthLimit) -> 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.
Use a checked finite depth or explicitly select an unlimited depth.
Sourcepub const fn with_truncate_at_max_depth(self, value: bool) -> ListDirOptions
pub const fn with_truncate_at_max_depth(self, value: bool) -> ListDirOptions
Intentionally stop descending at the depth limit instead of failing.
Sourcepub const fn with_fields(self, value: AttrMask) -> ListDirOptions
pub const fn with_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 recursive(self) -> bool
pub const fn allow_symlink_components(self) -> bool
pub fn fields(self) -> AttrMask
Sourcepub fn max_entries(self) -> Option<usize>
pub fn max_entries(self) -> Option<usize>
Configured override; None inherits the client’s entry budget.
Sourcepub fn max_path_bytes(self) -> Option<usize>
pub fn max_path_bytes(self) -> Option<usize>
Configured override; None inherits the client’s path-byte budget.
Sourcepub const fn max_depth(self) -> Option<DepthLimit>
pub const fn max_depth(self) -> Option<DepthLimit>
Configured override; None inherits the client’s descent limit.
pub fn max_entries_or(self, default: usize) -> usize
pub fn max_path_bytes_or(self, default: usize) -> usize
pub fn max_depth_or(self, default: DepthLimit) -> DepthLimit
pub const fn truncate_at_max_depth(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