//! Metadata-only logical lengths; callers retain traversal and cache policy.
use ;
/// Sum non-directory metadata lengths without following final symlinks.
///
/// Directory metadata contributes no bytes. Sparse files contribute their logical
/// length; symlinks (including dangling links) contribute their own metadata
/// length. Hard-linked paths are counted separately. Totals saturate at `u64::MAX`.
/// The iterative walk reads metadata and directory entries, never file contents.
/// No entry/depth budget or cleanup is selected; callers admit trees and retain
/// namespace custody. Intermediate path components can resolve through aliases.
/// This is an observation, not hostile-tree confinement or a snapshot.
///
/// # Errors
/// Returns the original metadata, directory-opening or entry-reading I/O error.