Bash-style file and directory globbing for Dart
open sourceBSD-3-Clausefree
glob is a Dart package from the Dart team for Bash-style file and directory globbing: it checks whether a path matches a glob pattern and lists every file or directory that matches one, synchronously or as a stream. Globs use POSIX path syntax on every platform, Windows roots included, and match case-sensitively on POSIX systems and browsers and case-insensitively on Windows by default. Part of the dart-lang/tools monorepo, published on pub.dev by tools.dart.dev under the BSD 3-Clause licence.
Problems it solves
- find every file matching a pattern like **.dart from my Dart program
- check whether a path matches a wildcard pattern in Dart the way a shell would
- list files matching a pattern in a Dart CLI so it behaves the same on Windows and Linux
Features
- Glob class that checks whether a path matches a pattern
- list and listSync to find every matching file or directory
- Bash-style syntax with POSIX paths on every platform
- Case-sensitive on POSIX and browsers, case-insensitive on Windows by default
