Library for accessing the directory structure of the underlying operating system.
Author: Michael Hanus
Version: January 2013
doesFileExist
:: String -> IO Bool
Returns true if the argument is the name of an existing file. |
doesDirectoryExist
:: String -> IO Bool
Returns true if the argument is the name of an existing directory. |
getFileSize
:: String -> IO Int
Returns the size of the file. |
getModificationTime
:: String -> IO ClockTime
Returns the modification time of the file. |
getCurrentDirectory
:: IO String
Returns the current working directory. |
setCurrentDirectory
:: String -> IO ()
Sets the current working directory. |
getDirectoryContents
:: String -> IO [String]
Returns the list of all entries in a directory. |
createDirectory
:: String -> IO ()
Creates a new directory with the given name. |
createDirectoryIfMissing
:: Bool -> String -> IO ()
Creates a new directory with the given name if it does not already exist. |
removeDirectory
:: String -> IO ()
Deletes a directory from the file system. |
renameDirectory
:: String -> String -> IO ()
Renames a directory. |
getHomeDirectory
:: IO String
Returns the home directory of the current user. |
getTemporaryDirectory
:: IO String
Returns the temporary directory of the operating system. |
getAbsolutePath
:: String -> IO String
Convert a path name into an absolute one. |
removeFile
:: String -> IO ()
Deletes a file from the file system. |
renameFile
:: String -> String -> IO ()
Renames a file. |
copyFile
:: String -> String -> IO ()
Copy the contents from one file to another file |
findFileWithSuffix
:: String -> [String] -> [String] -> IO (Maybe String)
Looks up the first file with a possible suffix in a list of directories. |
getFileWithSuffix
:: String -> [String] -> [String] -> IO String
Gets the first file with a possible suffix in a list of directories. |
Returns true if the argument is the name of an existing file. |
Returns true if the argument is the name of an existing directory. |
Returns the size of the file. |
Returns the modification time of the file. |
Returns the current working directory.
|
Sets the current working directory. |
Returns the list of all entries in a directory. |
Creates a new directory with the given name. |
Creates a new directory with the given name if it does not already exist.
If the first parameter is |
Deletes a directory from the file system. |
Renames a directory. |
Returns the home directory of the current user. |
Returns the temporary directory of the operating system. |
Convert a path name into an absolute one.
For instance, a leading |
Deletes a file from the file system. |
Renames a file. |
Copy the contents from one file to another file |
Looks up the first file with a possible suffix in a list of directories. Returns Nothing if such a file does not exist. |
Gets the first file with a possible suffix in a list of directories. An error message is delivered if there is no such file. |