2
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
3
Copyright (C) 2005- The University of Notre Dame
4
This software is distributed under the GNU General Public License.
5
See the file COPYING for details.
9
#include "stringtools.h"
18
int clean_dir( const char *dirname, const char *delete_pattern )
20
char subdir[PATH_MAX];
24
dir = opendir(dirname);
27
while((d=readdir(dir))) {
28
if(!strcmp(d->d_name,".")) continue;
29
if(!strcmp(d->d_name,"..")) continue;
30
sprintf(subdir,"%s/%s",dirname,d->d_name);
31
clean_dir(subdir,delete_pattern);
32
if(string_match(delete_pattern,d->d_name)) {