Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- candidateToPath :: CandidateFile -> FilePath
- findCandidates :: CUBE -> FilePath -> IO [Either String CandidateFile]
- makeCandidate :: CUBE -> FilePath -> [String] -> FilePath -> CandidateFile
- candidateMatchPrefix :: Separators -> CandidateFile -> CandidateFile -> Bool
- candidateMatchSuffix :: Separators -> FileSuffix -> CandidateFile -> CandidateFile -> Bool
Documentation
candidateToPath :: CandidateFile -> FilePath Source #
This converts a CandidatFile into a regular FilePath for access
findCandidates :: CUBE -> FilePath -> IO [Either String CandidateFile] Source #
makeCandidate :: CUBE -> FilePath -> [String] -> FilePath -> CandidateFile Source #
Create a CandidateFile entry for this top directory, sub-paths, and filename. In addition, any Explicit parameters with known values that appear in the filename are captured. Note that:
- There may be multiple possible matches for a single parameter (e.g. the value is repeated in the name or path, or an undefind value (Nothing) parameter could have multiple possible values extracted from the filename.
- File name matches are preferred over sub-path matches and will occlude the latter.
- All possible filename portions and sub-paths will be suggested for non-value
- parameters (validParams with Nothing).
candidateMatchPrefix :: Separators -> CandidateFile -> CandidateFile -> Bool Source #
Determines if the second CandidateFile argument matches the prefix of the first CandidateFile, up to any separator (if applicable). This can be used to match possible expected files against the current root file, or possible associated files against the current expected file.
candidateMatchSuffix :: Separators -> FileSuffix -> CandidateFile -> CandidateFile -> Bool Source #