glob-posix-0.1.0.1: Haskell bindings for POSIX glob library.

Copyright(c) Reuben D'Netto 2016
LicenseApache 2.0
Maintainerrdnetto@gmail.com
PortabilityPOSIX
Safe HaskellSafe
LanguageHaskell2010

System.Directory.Glob

Description

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

Synopsis

Documentation

(<>) :: Monoid m => m -> m -> m infixr 6 #

An infix synonym for mappend.

Since: 4.5.0.0

glob #

Arguments

:: GlobFlag

The control flags to apply.

-> String

The pattern.

-> IO [FilePath]

The paths matching the pattern.

Finds pathnames matching a pattern. e.g foo*, prog_v?, ba[zr], etc.

globDefaults :: GlobFlag #

Default value - equivalent to 0 for the C function.

globMany #

Arguments

:: GlobFlag

The control flags to apply.

-> [String]

A list of patterns to apply.

-> IO [FilePath]

The paths matching the patterns.

Like glob, but matches against multiple patterns. This function only allocates and marshals data once, making it more efficient than multiple glob calls.

data GlobFlag #

Control flags for glob. Use globDefaults if you have no special requirements. To combine multiple flags, use the <> operator (re-exported here for convenience). See man glob(3) for more information.

globMark :: GlobFlag #

Append a / to each entry that is the path of a directory.

globNoCheck :: GlobFlag #

If there are no matches, return the original pattern.

globNoEscape :: GlobFlag #

Disable the use of @@ for escaping metacharacters.

globNoSort :: GlobFlag #

Do not sort the entries before returning them.