4 releases

new 0.1.3 Jan 28, 2025
0.1.2 Nov 14, 2024
0.1.1 Oct 18, 2024
0.1.0 Sep 4, 2024

#1215 in Filesystem

GPL-3.0 license

18KB
283 lines

GitHub Actions Workflow Status Crates.io Version docs.rs

fs_walk is a crate providing functionalities to walk a file-system recursively using std Rust APIs.

This crate currently supports:

  • depth configuration
  • results chunking to feed any batch processing routine
  • result selection (only files, only dirs, by extension)

Example

use fs_walk;

let o = fs_walk::WalkOptions::new()
    // we want to walk only files
    .files()
    // we want files with .o extension
    .extension("o");

assert!(o.walk("./").count() > 0);

lib.rs:

fs_walk is a crate providing functionalities to walk a file-system recursively using std Rust APIs.

This crate currently supports:

  • depth configuration
  • results chunking to feed any batch processing routine
  • result selection (only files, only dirs, by extension)

Example

use fs_walk;

let o = fs_walk::WalkOptions::new()
    // we want to walk only files
    .files()
    // we want files with .o extension
    .extension("o");

assert!(o.walk("./").count() > 0);

No runtime deps