The Haskell CabalSource codeContentsIndex
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
splitFilePath :: FilePath -> (String, String, String)
joinFilenameDir :: String -> String -> FilePath
joinExt :: FilePath -> String -> String
pathInits :: FilePath -> [FilePath]
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 -> FilePath -> [String] -> [String] -> IO ()
moduleToFilePath :: FilePath -> String -> [String] -> IO [FilePath]
createIfNotExists :: Bool -> FilePath -> IO ()
mkLibName :: FilePath -> String -> String
copyFile :: FilePath -> FilePath -> IO ()
pathJoin :: [String] -> FilePath
removeFileRecursive :: FilePath -> IO ()
sequenceMap :: Monad m => (a -> m b) -> [a] -> m [b]
removeFiles :: [FilePath] -> IO [FilePath]
hasExt :: FilePath -> String -> Bool
currentDir :: FilePath
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
:: FilePathbuild prefix (location of objects)
-> FilePathTarget directory
-> [String]Modules
-> [String]search suffixes
-> IO ()
Put the source files into the right directory in preperation for something like sdist or installHugs.
moduleToFilePath
:: FilePathsearch location
-> StringModule 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
:: BoolCreate its parents too?
-> FilePathThe path to the directory you want to make
-> IO ()
mkLibName
:: FilePathfile Prefix
-> Stringlibrary 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
:: FilePathDoes this file
-> StringHave 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