home *** CD-ROM | disk | FTP | other *** search
- #include <osbind.h>
-
-
-
- /*
- * delete_file
- *
- * given the name of a file, attempt to delete it and return zero on success,
- * non-zero if not. 'force' parameter, if non-zero, will try to change the
- * mode of a file from read-only to delete it.
- */
- int delete_file(char *file, char force)
-
- {
- if (force) {
- int mode;
-
- if ((mode = Fattrib(file, 0, 0)) & FA_RDONLY)
- Fattrib(file, 1, mode&(!FA_RDONLY));
- }
-
- return Fdelete(file);
- }
-