toPosix function
path with Windows separators rewritten as /.
Patterns are written with forward slashes — the README, the help text and
every example use them — but Directory.listSync hands back \ on
Windows, so lib/src/ matched nothing there. Normalising the path, not the
pattern, keeps one pattern working on every platform.
Implementation
String toPosix(String path) => path.replaceAll('\\', '/');