-- * Actions on directories
createDirectory -- :: FilePath -> IO ()
+#ifndef __NHC__
, createDirectoryIfMissing -- :: Bool -> FilePath -> IO ()
+#endif
, removeDirectory -- :: FilePath -> IO ()
, removeDirectoryRecursive -- :: FilePath -> IO ()
, renameDirectory -- :: FilePath -> FilePath -> IO ()
import Control.Exception.Base
#ifdef __NHC__
-import Directory hiding ( getDirectoryContents
- , doesDirectoryExist, doesFileExist
- , getModificationTime )
+import Directory -- hiding ( getDirectoryContents
+ -- , doesDirectoryExist, doesFileExist
+ -- , getModificationTime )
import System (system)
#endif /* __NHC__ */
#endif
+#ifndef __NHC__
-- | @'createDirectoryIfMissing' parents dir@ creates a new directory
-- @dir@ if it doesn\'t exist. If the first argument is 'True'
-- the function will also create all parent directories if they are missing.
#endif
) `catch` ((\_ -> return ()) :: IOException -> IO ())
| otherwise -> throw e
+#endif /* !__NHC__ */
#if __GLASGOW_HASKELL__
{- | @'removeDirectory' dir@ removes an existing directory /dir/. The
#endif
-#ifndef __HUGS__
+#ifdef __GLASGOW_HASKELL__
{- |@'getDirectoryContents' dir@ returns a list of /all/ entries
in /dir/.
-- no need to reverse, ordering is undefined
#endif /* mingw32 */
-#endif /* !__HUGS__ */
+#endif /* __GLASGOW_HASKELL__ */
{- |If the operating system has a notion of current directories,
#endif /* __GLASGOW_HASKELL__ */
-#ifndef __HUGS__
+#ifdef __GLASGOW_HASKELL__
{- |The operation 'doesDirectoryExist' returns 'True' if the argument file
exists and is a directory, and 'False' otherwise.
-}
#endif
-#endif /* !__HUGS__ */
+#endif /* __GLASGOW_HASKELL__ */
#ifdef mingw32_HOST_OS
withFileStatus :: String -> FilePath -> (Ptr CStat -> IO a) -> IO a