- takeBaseName :: FilePath -> String
- dropExtension :: FilePath -> FilePath
- takeExtension :: FilePath -> String
- lookupModule :: [FilePath] -> [FilePath] -> ModuleIdent -> IO (Maybe FilePath)
- lookupFile :: [FilePath] -> [String] -> String -> IO (Maybe FilePath)
- lookupInterface :: [FilePath] -> ModuleIdent -> IO (Maybe FilePath)
- getCurryPath :: [FilePath] -> FilePath -> IO (Maybe FilePath)
- writeModule :: FilePath -> String -> IO ()
- readModule :: FilePath -> IO String
- doesModuleExist :: FilePath -> IO Bool
- maybeReadModule :: FilePath -> IO (Maybe String)
- getModuleModTime :: FilePath -> IO ClockTime
Documentation
takeBaseName :: FilePath -> String
Get the base name, without an extension or path.
takeBaseName "file/test.txt" == "test"
takeBaseName "dave.ext" == "dave"
takeBaseName "" == ""
takeBaseName "test" == "test"
takeBaseName (addTrailingPathSeparator x) == ""
takeBaseName "file/file.tar.gz" == "file.tar"
dropExtension :: FilePath -> FilePath
Remove last extension, and the "." preceding it.
dropExtension x == fst (splitExtension x)
takeExtension :: FilePath -> String
Get the extension of a file, returns ""
for no extension, .ext
otherwise.
takeExtension x == snd (splitExtension x)
Valid x => takeExtension (addExtension x "ext") == ".ext"
Valid x => takeExtension (replaceExtension x "ext") == ".ext"
lookupModule :: [FilePath] -> [FilePath] -> ModuleIdent -> IO (Maybe FilePath)Source
lookupInterface :: [FilePath] -> ModuleIdent -> IO (Maybe FilePath)Source
readModule :: FilePath -> IO StringSource
doesModuleExist :: FilePath -> IO BoolSource