Crates.io | dowser |
lib.rs | dowser |
version | 0.16.1 |
created_at | 2021-02-22 04:07:24.731515+00 |
updated_at | 2025-08-22 03:43:19.949941+00 |
description | A recursive, canonicalizing file finding library for Unix. |
homepage | |
repository | https://github.com/Blobfolio/dowser |
max_upload_size | |
id | 358783 |
size | 65,552 |
Dowser
is a(nother) fast, recursive file-finding library for Unix/Rust. It differs from Walkdir
and kin in a number of ways:
Dowser::without_symlinks
;If those things sound nice, this library might be a good fit.
On the other hand, Dowser
is optimized for file searching; the iterator crawls but does not yield directory paths, which could be bad if you need those too. Haha.
Add dowser
to your dependencies
in Cargo.toml
, like:
[dependencies]
dowser = "0.16.*"
All you need to do is chain Dowser::default
with one or more of the following seed methods:
Dowser::with_path
/ Dowser::with_paths
Dowser::without_path
/ Dowser::without_paths
From there, you can apply any Iterator
methods you want.
use dowser::Dowser;
use std::path::PathBuf;
// Return all files under "/usr/share/man".
let files1: Vec::<PathBuf> = Dowser::default()
.with_path("/usr/share/man")
.collect();
// Return only Gzipped files using callback filter.
let files1: Vec::<PathBuf> = Dowser::default()
.with_path("/usr/share/man")
.filter(|p|
p.extension().is_some_and(|e| e.eq_ignore_ascii_case("gz"))
)
.collect();