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. |
fileSize
:: 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 |
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 |