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