pub fn count_files_with_progress<F>(path: &Path, on_progress: F) -> u64Expand description
Count files in a directory with progress callback.
The callback is invoked every 100 files with the current count. This allows updating a progress display during enumeration of large directories.
- If path is a file: returns 1
- If path is a directory: returns count of all files recursively
- If path doesn’t exist or is a symlink: returns 0
§Arguments
path- Path to count files inon_progress- Callback invoked every 100 files with current count
§Returns
Total file count