Safe Haskell | None |
---|---|
Language | Haskell2010 |
Internal utility functions.
Synopsis
- commonDirectory :: String -> FilePath
- compileParentPath :: FilePath -> Maybe FilePath
- compilePathToRoot :: FilePath -> FilePath
- replaceSingleDot :: String -> String
- stripPrefix :: String -> String -> String
- takeDirName :: FilePath -> FilePath
Documentation
commonDirectory :: String -> FilePath Source #
Get the common directory from a pattern.
compileParentPath :: FilePath -> Maybe FilePath Source #
Path to parent, when there is one.
Just "../" or Nothing
compilePathToRoot :: FilePath -> FilePath Source #
Path to root.
Example, if dirname
is 'example/subdir',
then this will be ../../
.
If the dirname
is empty,
then this will be empty as well.
replaceSingleDot :: String -> String Source #
If the path is a single dot, return an empty string. Otherwise return the path.
takeDirName :: FilePath -> FilePath Source #
Take dirname and replace single dot.