-- -----------------------------------------------------------------------------
--- $Id: Directory.hsc,v 1.3 2001/01/12 17:45:30 qrczak Exp $
+-- $Id: Directory.hsc,v 1.5 2001/02/13 15:23:33 rrt Exp $
--
-- (c) The University of Glasgow, 1994-2000
--
throwErrnoIfMinus1Retry_ "removeFile" (unlink s)
{-
-@renameDirectory old@ {\em new} changes the name of an existing
+@renameDirectory@ {\em old} {\em new} changes the name of an existing
directory from {\em old} to {\em new}. If the {\em new} directory
already exists, it is atomically replaced by the {\em old} directory.
If the {\em new} directory is neither the {\em old} directory nor an
else do errno <- getErrno
if (errno == eINTR) then loop dir else do
throwErrnoIfMinus1_ "getDirectoryContents" $ closedir dir
- if (isValidErrno errno) -- EOF
- then throwErrno "getDirectoryContents"
- else return []
+ if (errno == eOK)
+ then return []
+ else throwErrno "getDirectoryContents"
{-
If the operating system has a notion of current directories,