|
Distribution.Simple.Utils | Portability | GHC | Stability | alpha | Maintainer | Isaac Jones <ijones@syntaxpolice.org> |
|
|
|
|
|
Description |
Explanation: Misc. Utilities, especially file-related utilities.
Stuff used by multiple modules that doesn't fit elsewhere. |
|
Synopsis |
|
|
|
Documentation |
|
splitFilePath :: FilePath -> (String, String, String) |
Split the path into (directory, filename sans extension, extension) |
|
joinFilenameDir :: String -> String -> FilePath |
|
joinExt :: FilePath -> String -> String |
Join extension to file path |
|
pathInits :: FilePath -> [FilePath] |
Get this path and all its parents. |
|
isPathSeparator :: Char -> Bool |
|
pathSeparatorStr :: String |
|
split :: Char -> String -> [String] |
|
die :: String -> IO a |
|
findBinary :: String -> IO (Maybe FilePath) |
|
rawSystemPath :: String -> [String] -> IO ExitCode |
|
rawSystemExit :: FilePath -> [String] -> IO () |
|
maybeExit :: IO ExitCode -> IO () |
|
rawSystemPathExit :: String -> [String] -> IO () |
|
moveSources |
:: FilePath | build prefix (location of objects) | -> FilePath | Target directory | -> [String] | Modules | -> [String] | search suffixes | -> IO () | | Put the source files into the right directory in preperation for
something like sdist or installHugs. |
|
|
moduleToFilePath |
:: FilePath | search location | -> String | Module Name | -> [String] | possible suffixes | -> IO [FilePath] | | Get the file path for this particular module. In the IO monad
because it looks for the actual file. Might eventually interface
with preprocessor libraries in order to correctly locate more
filenames.
Returns Nothing if the file doesn't exist. |
|
|
createIfNotExists |
:: Bool | Create its parents too? | -> FilePath | The path to the directory you want to make | -> IO () | |
|
|
mkLibName |
:: FilePath | file Prefix | -> String | library name. | -> String | |
|
|
copyFile :: FilePath -> FilePath -> IO () |
Preserves permissions and, if possible, atime+mtime |
|
pathJoin :: [String] -> FilePath |
Create a path from a list of path elements |
|
removeFileRecursive :: FilePath -> IO () |
Probably follows symlinks, be careful. |
|
sequenceMap :: Monad m => (a -> m b) -> [a] -> m [b] |
|
removeFiles |
:: [FilePath] | Files and directories to remove | -> IO [FilePath] | The ones we were unable to remove because they were of
an inappropriate type (directory) removeFiles | Remove a list of files; if it encounters a directory, it doesn't
remove it, but returns it. Throws everything that removeFile
throws unless the file is a directory. |
|
|
hasExt |
:: FilePath | Does this file | -> String | Have this extension? | -> Bool | | Not exported. Does this file have the given extension? |
|
|
currentDir :: FilePath |
The path name that represents the current directory. May be
system-specific. In Unix, it's . FIX: What about other arches? |
|
Produced by Haddock version 0.6 |