FilePather-0.1.3: Functions on System.FilePath

Safe HaskellSafe-Infered

System.FilePath.FilePather.FilePathPredicate

Synopsis

Documentation

class FilePathPredicate f whereSource

Functions that are common to predicates that work on FilePath values.

Methods

always :: Monad g => f gSource

A predicate that always succeeds.

never :: Monad g => f gSource

A predicate that always fails.

(.&&.) :: Monad g => f g -> f g -> f gSource

Return a predicate that succeeds only if the two given predicates succeed.

(.||.) :: Monad g => f g -> f g -> f gSource

Return a predicate that succeeds if any of the two given predicates succeed.

(.!.) :: Monad g => f g -> f gSource

Negates the given predicate.

extension :: Monad g => (FilePath -> Bool) -> f gSource

A predicate that computes its result based on a file name extension.

directory :: Monad g => (FilePath -> Bool) -> f gSource

A predicate that computes its result based on a directory.

hasExtension :: Monad g => f gSource

A predicate that succeeds if its FilePath has an extension.

notHasExtension :: Monad g => f gSource

A predicate that succeeds if its FilePath does not have an extension.

splitExtension :: Monad g => (String -> String -> Bool) -> f gSource

A predicate that computes its result based on the splitting of a name and extension.

splitDirectories :: Monad g => ([FilePath] -> Bool) -> f gSource

A predicate that computes its result based on the splitting of a name into directories.

hasTrailingPathSeparator :: Monad g => f gSource

A predicate that succeeds if its FilePath has a trailing path separator.

notHasTrailingPathSeparator :: Monad g => f gSource

A predicate that succeeds if its FilePath does not have a trailing path separator.

fileName :: Monad g => (FilePath -> Bool) -> f gSource

A predicate that computes its result based on the file name.

baseName :: Monad g => (FilePath -> Bool) -> f gSource

A predicate that computes its result based on the base name.

normalise :: Monad g => (FilePath -> Bool) -> f gSource

A predicate that computes its result based on the normalised file name.

makeValid :: Monad g => (FilePath -> Bool) -> f gSource

A predicate that computes its result based on the file name having been made valid.

isRelative :: Monad g => f gSource

A predicate that succeeds if its FilePath is relative.

isNotRelative :: Monad g => f gSource

A predicate that succeeds if its FilePath is not relative.

isAbsolute :: Monad g => f gSource

A predicate that succeeds if its FilePath is absolute.

isNotAbsolute :: Monad g => f gSource

A predicate that succeeds if its FilePath is not absolute.

isValid :: Monad g => f gSource

A predicate that succeeds if its FilePath is valid.

isNotValid :: Monad g => f gSource

A predicate that succeeds if its FilePath is not valid.