| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Xrefcheck.System
Synopsis
- askWithinCI :: IO Bool
- newtype RelPosixLink = RelPosixLink {}
- (</>) :: RelPosixLink -> RelPosixLink -> RelPosixLink
- mkRelPosixLink :: FilePath -> RelPosixLink
- filePathFromRoot :: FilePath -> RelPosixLink -> FilePath
- getIntermediateDirs :: RelPosixLink -> [RelPosixLink]
- hasBackslash :: RelPosixLink -> Bool
- takeDirectory :: RelPosixLink -> RelPosixLink
- takeExtension :: RelPosixLink -> String
- data CanonicalRelPosixLink
- hasUnexpanededParentIndirections :: CanonicalRelPosixLink -> Bool
- canonicalizeRelPosixLink :: RelPosixLink -> CanonicalRelPosixLink
- data CanonicalRelGlobPattern
- matchesGlobPatterns :: [CanonicalRelGlobPattern] -> CanonicalRelPosixLink -> Bool
- mkCanonicalRelGlobPattern :: ToString s => s -> Either String CanonicalRelGlobPattern
- newtype PrintUnixPaths = PrintUnixPaths Bool
- mkPathForPrinting :: Given PrintUnixPaths => FilePath -> String
Documentation
askWithinCI :: IO Bool Source #
Heuristics to check whether we are running within CI. Check the respective env variable which is usually set in all CIs.
newtype RelPosixLink Source #
Relative file path with POSIX path separators.
This type exist in contrast to FilePath which, in this project,
is used for platform-dependent file paths and related filesystem
IO operations.
Note that RelPosixLink may contain `\` characters, but they are
considered as part of the filename instead of denoting a path
separator.
Constructors
| RelPosixLink | |
Fields | |
Instances
(</>) :: RelPosixLink -> RelPosixLink -> RelPosixLink Source #
Join two RelPosixLinks.
mkRelPosixLink :: FilePath -> RelPosixLink Source #
Create a POSIX file path from a platform-dependent one.
filePathFromRoot :: FilePath -> RelPosixLink -> FilePath Source #
getIntermediateDirs :: RelPosixLink -> [RelPosixLink] Source #
Get the list of directories between a RelPosixLink and its
relative root.
hasBackslash :: RelPosixLink -> Bool Source #
'Check if a RelPosixLink contains any backslash.
takeDirectory :: RelPosixLink -> RelPosixLink Source #
takeDirectory version for RelPosixLink.
takeExtension :: RelPosixLink -> String Source #
takeExtension version for RelPosixLink.
data CanonicalRelPosixLink Source #
Relative POSIX file path with some normalizations applied.
It should be created from a RelPosixLink via
canonicalizeRelPosixLink.
Instances
hasUnexpanededParentIndirections :: CanonicalRelPosixLink -> Bool Source #
Check if a CanonicalRelPosixLink passes through its relative root when
expanding indirections.
canonicalizeRelPosixLink :: RelPosixLink -> CanonicalRelPosixLink Source #
Canonicalize a RelPosixLink.
Applies the following normalizations:
- Drop trailing path separator.
- Expand
.and '..' indirections syntactically.
data CanonicalRelGlobPattern Source #
Relative Glob pattern with some normalizations applied.
It should be created via mkCanonicalRelGlobPattern.
Instances
| FromJSON CanonicalRelGlobPattern Source # | |
Defined in Xrefcheck.System Methods parseJSON :: Value -> Parser CanonicalRelGlobPattern # parseJSONList :: Value -> Parser [CanonicalRelGlobPattern] # | |
mkCanonicalRelGlobPattern :: ToString s => s -> Either String CanonicalRelGlobPattern Source #
newtype PrintUnixPaths Source #
Constructors
| PrintUnixPaths Bool |
mkPathForPrinting :: Given PrintUnixPaths => FilePath -> String Source #