, getDirectoryContents -- :: FilePath -> IO [FilePath]
, getCurrentDirectory -- :: IO FilePath
, setCurrentDirectory -- :: FilePath -> IO ()
+
+ -- * Pre-defined directories
, getHomeDirectory
, getAppUserDataDirectory
, getUserDocumentsDirectory
#ifdef __NHC__
import Directory
+import System (getEnv)
getHomeDirectory :: IO FilePath
getHomeDirectory = getEnv "HOME"
getAppUserDataDirectory :: String -> IO FilePath
On Unix, 'getUserDocumentsDirectory' returns the value of the @HOME@
environment variable. On Windows, the system is queried for a
suitable path; a typical path might be
-@C:/Documents and Settings/user/My Documents@.
+@C:\/Documents and Settings\/user\/My Documents@.
The operation may fail with: