-static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
-{
- if (unlink(fileName) < 0) {
- perrorMsg("%s", fileName);
- return (FALSE);
- }
- return (TRUE);
-}
-
-static int dirAction(const char *fileName, struct stat *statbuf, void* junk)
-{
- if (recursiveFlag == FALSE) {
- errno = EISDIR;
- perrorMsg("%s", fileName);
- return (FALSE);
- }
- if (rmdir(fileName) < 0) {
- perrorMsg("%s", fileName);
- return (FALSE);
- }
- return (TRUE);
-}