| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Shikensu.Internal.Utilities
Description
Internal utility functions.
- commonDirectory :: String -> FilePath
- compileParentPath :: FilePath -> Maybe FilePath
- compilePathToRoot :: FilePath -> FilePath
- replaceSingleDot :: String -> String
- stripPrefix :: String -> String -> String
- takeDirName :: FilePath -> FilePath
Documentation
commonDirectory :: String -> FilePath #
Get the common directory from a pattern.
compileParentPath :: FilePath -> Maybe FilePath #
Path to parent, when there is one.
Just "../" or Nothing
compilePathToRoot :: FilePath -> FilePath #
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 #
If the path is a single dot, return an empty string. Otherwise return the path.
stripPrefix :: String -> String -> String #
Strip prefix.
takeDirName :: FilePath -> FilePath #
Take dirname and replace single dot.