File: Glob.hs

package info (click to toggle)
haskell-glob 0.10.2-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 220 kB
  • sloc: haskell: 1,583; makefile: 2
file content (79 lines) | stat: -rw-r--r-- 2,457 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
-- File created: 2008-10-10 13:37:42

-- | A library for globbing: matching patterns against file paths akin to the
-- POSIX @glob()@ function.
--
-- Pattern syntax is documented by 'compile'. To toggle features at compile
-- time, look into 'CompOptions'. To modify matching behaviour, look into
-- 'MatchOptions'.
--
-- Basic usage examples:
--
-- Matching a 'String' pattern against a 'FilePath':
--
-- @
-- 'match' ('compile' pattern) filepath
-- @
--
-- Matching a 'String' pattern against all paths in the current working
-- directory:
--
-- @
-- 'glob' pattern
-- @
--
-- Matching a 'String' pattern against all paths in a given directory (a
-- 'FilePath'):
--
-- @
-- 'globDir1' ('compile' pattern) directorypath
-- @
--
-- Matching a list of 'String' patterns against all paths in a given directory,
-- returning the matches for each pattern as well as the paths not matched by
-- any of the patterns:
--
-- @
-- 'globDir' (map 'compile' patterns) directorypath
-- @
module System.FilePath.Glob
   ( -- * Data type
     Pattern
     -- * Functions
     -- ** Compilation
   , compile, decompile, simplify
     -- *** Options
   , CompOptions(..)
   , compileWith, tryCompileWith
     -- **** Predefined option sets
   , compDefault, compPosix
     -- ** Matching
   , match
   , globDir, globDir1, glob
     -- *** Options
   , MatchOptions(..)
   , matchWith
   , GlobOptions(..)
   , globDirWith
     -- **** Predefined option sets
   , matchDefault, matchPosix
   , globDefault
     -- ** Miscellaneous
   , commonDirectory
   , isLiteral
   ) where

import System.FilePath.Glob.Base      ( Pattern
                                      , CompOptions(..), MatchOptions(..)
                                      , compDefault, compPosix
                                      , matchDefault, matchPosix
                                      , compile, compileWith, tryCompileWith
                                      , decompile
                                      , isLiteral
                                      )
import System.FilePath.Glob.Directory ( GlobOptions(..), globDefault
                                      , globDir, globDirWith, globDir1, glob
                                      , commonDirectory
                                      )
import System.FilePath.Glob.Match     (match, matchWith)
import System.FilePath.Glob.Simplify  (simplify)