-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Haskell bindings for POSIX glob library.
--   
--   Wrapper for the glob(3) function. The key functions are glob and
--   globMany. GNU extensions are supported but contained in a different
--   module to encourage portability.
@package glob-posix
@version 0.1.0.1


-- | On non-GNU platforms, this module exports values for <tt>GlobFlag</tt>
--   which will throw an exception on use. They can be used to defer the
--   failure to runtime, when you wish to avoid adding <tt>#ifdef</tt>
--   checks to your code.
module System.Directory.Glob.GNU.Compat


-- | This module exports <a>GlobFlag</a> values which are only supported on
--   platforms using the GNU implementation of glob. Using them on non-GNU
--   platforms will result in a compile-time failure. If you wish to defer
--   the failure to run-time, you should also import
--   <a>System.Directory.Glob.GNU.Compat</a>.
module System.Directory.Glob.GNU

-- | Enable CSH-style brace expansion. e.g. foo.{txt,md}. Supports nested
--   braces. (GNU extension)
globBrace :: GlobFlag

-- | Enables globNoCheck if the pattern contains no metacharacters. (GNU
--   extension)
globNoMagic :: GlobFlag

-- | Only return directories, if it is cheap to do so. (GNU extension)
globOnlyDir :: GlobFlag

-- | Allow leading <a>.</a> to be matched by metacharacters.
globPeriod :: GlobFlag

-- | Substitute home directory for '~' or '~user' prefixes.
globTilde :: GlobFlag

-- | Like globTilde, but return no matches if there is no such user.
globTildeCheck :: GlobFlag


-- | This module provides a wrapper around the <a>glob(3)</a> C function,
--   which finds file paths matching a given pattern. All of the standard
--   flags are supported, though GNU extensions are contained in the
--   <a>System.Directory.Glob.GNU</a> module to encourage portability.
module System.Directory.Glob

-- | An infix synonym for <a>mappend</a>.
(<>) :: Monoid m => m -> m -> m
infixr 6 <>

-- | Finds pathnames matching a pattern. e.g <tt>foo*</tt>,
--   <tt>prog_v?</tt>, <tt>ba[zr]</tt>, etc.
glob :: GlobFlag -> String -> IO [FilePath]

-- | Default value - equivalent to 0 for the C function.
globDefaults :: GlobFlag

-- | Like glob, but matches against multiple patterns. This function only
--   allocates and marshals data once, making it more efficient than
--   multiple glob calls.
globMany :: GlobFlag -> [String] -> IO [FilePath]

-- | Control flags for glob. Use <a>globDefaults</a> if you have no special
--   requirements. To combine multiple flags, use the <a>&lt;&gt;</a>
--   operator (re-exported here for convenience). See <a>man glob(3)</a>
--   for more information.
data GlobFlag

-- | Append a <tt>/</tt> to each entry that is the path of a directory.
globMark :: GlobFlag

-- | If there are no matches, return the original pattern.
globNoCheck :: GlobFlag

-- | Disable the use of @@ for escaping metacharacters.
globNoEscape :: GlobFlag

-- | Do not sort the entries before returning them.
globNoSort :: GlobFlag
instance Foreign.Storable.Storable System.Directory.Glob.CGlob
