00001 #ifndef RM_H
00002 #define RM_H
00003
00004
00005 #define RM_BOGUS 0
00006 #define RM_FILE 1
00007 #define RM_DIR 2
00008
00009
00010 #define _RM_ENTRY 0
00011 #define _RM_ADVANCE 1
00012 #define _RM_REWIND 2
00013 #define _RM_EXIT 3
00014
00015
00016 typedef struct {
00017
00018 unsigned int force;
00019 unsigned int recursive;
00020 unsigned int safe;
00021
00022
00023 int advance;
00024 DIR *entry;
00025 char *owd;
00026 char *cwd;
00027 char *nwd;
00028
00029
00030 int f_removed;
00031 int d_removed;
00032 } rm_job_t;
00033
00034
00035
00036 static unsigned int rm_start(rm_job_t *);
00037 static void rm_end(rm_job_t *rm);
00038 static unsigned int rm_recursive(const char *);
00039 static unsigned int rm_single(const char *);
00040 static unsigned int rm_scope(const char *);
00041
00042 #endif
00043