2 * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
4 * $Id: removeFile.c,v 1.3 1998/12/02 13:27:49 simonm Exp $
6 * removeFile Runtime Support
12 #ifdef HAVE_SYS_TYPES_H
13 #include <sys/types.h>
16 #ifdef HAVE_SYS_STAT_H
26 /* Check for a non-directory */
27 while (stat(path, &sb) != 0) {
34 if (S_ISDIR(sb.st_mode)) {
35 ghc_errtype = ERR_INAPPROPRIATETYPE;
36 ghc_errstr = "file is a directory";
39 while (unlink(path) != 0) {