ghcup-0.1.17.10: ghc toolchain installer
Safe HaskellNone
LanguageHaskell2010

GHCup.Utils.File.Common

Synopsis

Documentation

searchPath :: [FilePath] -> FilePath -> IO (Maybe FilePath) Source #

Search for a file in the search paths.

Catches PermissionDenied and NoSuchThing and returns Nothing.

isShadowed :: FilePath -> IO (Maybe FilePath) Source #

Check wether a binary is shadowed by another one that comes before it in PATH. Returns the path to said binary, if any.

isInPath :: FilePath -> IO Bool Source #

Check whether the binary is in PATH. This returns only True if the directory containing the binary is part of PATH.

expandFilePath :: [Either FilePath Regex] -> IO [FilePath] Source #

Follows the first match in case of Regex.