2 * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
4 * $Id: renameDirectory.c,v 1.3 1998/12/02 13:27:50 simonm Exp $
6 * renameDirectory Runtime Support
12 #ifdef HAVE_SYS_TYPES_H
13 #include <sys/types.h>
16 #ifdef HAVE_SYS_STAT_H
21 renameDirectory(opath, npath)
27 /* Check for an actual directory */
28 while (stat(opath, &sb) != 0) {
35 if (!S_ISDIR(sb.st_mode)) {
36 ghc_errtype = ERR_INAPPROPRIATETYPE;
37 ghc_errstr = "not a directory";
40 while(rename(opath, npath) != 0) {