@hackage filepattern0.1

File path glob-like matching

A library for matching files using patterns such as "src/**/*.png" for all .png files recursively under the src directory. Features:

  • All matching is O(n).

  • See System.FilePattern and System.FilePattern.?== simple matching and semantics.

  • Use System.FilePattern.match and System.FilePattern.substitute to extract suitable strings from the * and ** matches, and substitute them back into other patterns.

  • Use System.FilePattern.step and System.FilePattern.matchMany to perform bulk matching of many patterns against many paths simultaneously.

  • Use System.FilePattern.Directory to perform optimised directory traverals using patterns.

Originally taken from the Shake library.