home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
sarg1221.zip
/
indexonly.c
< prev
next >
Wrap
C/C++ Source or Header
|
2002-06-13
|
591b
|
30 lines
/*
* sarg - Squid user management log
* Mar/98 - Pedro L Orso - orso@onda.com.br
*/
#include "include/conf.h"
void index_only(const char *dirname, int debug)
{
DIR *dirp;
struct dirent *direntp;
char remove[MAXLEN];
dirp = opendir(dirname);
while ( (direntp = readdir( dirp )) != NULL ){
if(strcmp(direntp->d_name,".") == 0 || strcmp(direntp->d_name,"..") == 0 || strcmp(direntp->d_name, "index.html") == 0)
continue;
sprintf(remove,"%s/%s",dirname,direntp->d_name);
unlink(remove);
}
(void)closedir( dirp );
return;
}