-static int dirAction(const char *fileName, struct stat *statbuf, void* junk)
-{
- if (recursiveFlag == FALSE) {
- errno = EISDIR;
- perror_msg("%s", fileName);
- return (FALSE);
- }
-#ifdef BB_FEATURE_RM_INTERACTIVE
- if (interactiveFlag == TRUE) {
- printf("rm: remove directory `%s'? ", fileName);
- if (ask_confirmation() == 0)
- return (TRUE);
- }
-#endif
- if (rmdir(fileName) < 0) {
- perror_msg("%s", fileName);
- return (FALSE);
- }
- return (TRUE);
-}