#ifdef __NHC__
import Directory
+import System (system)
#endif /* __NHC__ */
#ifdef __HUGS__
-}
copyFile :: FilePath -> FilePath -> IO ()
+#ifdef __NHC__
+copyFile fromFPath toFPath =
+ do readFile fromFPath >>= writeFile toFPath
+ try (copyPermissions fromFPath toFPath)
+ return ()
+#else
copyFile fromFPath toFPath =
copy `catch` (\e -> case e of
IOException e ->
when (count > 0) $ do
hPutBuf hTo buffer count
copyContents hFrom hTo buffer
+#endif
-- | Given path referring to a file or directory, returns a
-- canonicalized path, with the intent that two paths referring