2 % (c) The GRASP/AQUA Project, Glasgow University, 1995
4 \subsection[renameDirectory.lc]{renameDirectory Runtime Support}
11 #ifdef HAVE_SYS_TYPES_H
12 #include <sys/types.h>
15 #ifdef HAVE_SYS_STAT_H
20 renameDirectory(opath, npath)
26 /* Check for an actual directory */
27 while (stat(opath, &sb) != 0) {
34 if (!S_ISDIR(sb.st_mode)) {
35 ghc_errtype = ERR_INAPPROPRIATETYPE;
36 ghc_errstr = "not a directory";
39 while(rename(opath, npath) != 0) {