dir-iterator
Iterator that recursively scans and filters files from a directory.
Usage
Installation
Start using this library by running the following command in your cargo project directory.
Read a Directory Recursively
Read a directory by using DirIterator::build_from_path(path):
use *;
Read Current Directory Recursively
Read current directory by using DirIterator::build_current() is a little shorter because it will panic if current directory does not exist or can't be retrieved.
use *;
You may use DirIterator::try_build_current() to get errors instead of panic.
Filter Result with Wildcards
Filter the result with wildcards by using exclude(wildcard) and which generates a filter.
use *;
Ignore Folders When Scanning
To prevent some directories from being scanned at all you ca use ignore(wildcard)
use *;