Google

NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.64 ">

4.8. DirectoryExts

The DirectoryExts module follows the footstep of other 'Exts' modules and provides functionality that goes beyond what the Haskell 98 module Directory offers. That is, functionality that provides access to file/directory operations in an OS-independent manner.

DirectoryExts currently exports the following:

copyFile  :: FilePath -> FilePath -> IO ()

Notes:

  • copyFile lets you copy a file to another non-existent file.

    File copying is done external to Haskell, and is for natural reasons quicker as a result and, most importantly, file copying handles the number of the OS-specific error conditions that might arise as a result of trying to perform the file copy operation.

    Should the file copying operation for some reason not succeed, the action copyFile raises an IO exception to signal the fact.