Dowser

Documentation Changelog crates.io Build Status Dependency Status PRs Welcome

Dowser is a(nother) fast, recursive file-finding library for Unix/Rust. It differs from Walkdir and kin in a number of ways:

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.

Installation

Add dowser to your dependencies in Cargo.toml, like:

[dependencies] dowser = "0.6.*"

Example

All you need to do is chain Dowser::default with one or more of the following seed methods:

From there, you can apply any Iterator methods you want, or immediately collect the results using Dowser::into_vec or Dowser::into_vec_filtered.

```rust use dowser::Dowser; use std::path::PathBuf;

// Return all files under "/usr/share/man". let files1: Vec:: = Dowser::default() .with_path("/usr/share/man") .collect();

// Same as above, but slightly faster. let files2: Vec:: = Dowser::default() .withpath("/usr/share/man") .intovec();

assert_eq!(files1.len(), files2.len());

// Return only Gzipped files using callback filter. let files1: Vec:: = Dowser::default() .withpath("/usr/share/man") .filter(|p| p.extension().mapor( false, |e| e.eqignoreascii_case("gz") ) ) .collect();

// Same as above, but slightly faster. let files2: Vec:: = Dowser::default() .withpath("/usr/share/man") .intovecfiltered(|p| p.extension().mapor( false, |e| e.eqignoreascii_case("gz") ) );

assert_eq!(files1.len(), files2.len()); ```

License

See also: CREDITS.md

Copyright © 2022 Blobfolio, LLC <hello@blobfolio.com>

This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.