Skip to main content

count_files

Function count_files 

Source
pub fn count_files(path: &Path) -> u64
Expand description

Count files in a path.

  • 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

Uses jwalk with sorting disabled for maximum speed.