Archived
1
0
Fork 0
This repository has been archived on 2026-05-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
archived/test/t_fscrawl.c

40 lines
539 B
C

#include <stdio.h>
#include "../src/notify/fscrawl.h"
int main(int argc, char *argv[]) {
fscrawl_t crawl;
unsigned int c_ent = 0;
if (argc < 2)
return 1;
crawl = fsc_open(argv[1]);
if (crawl == NULL) {
printf("Invalid path\n");
return 1;
}
for(;;) {
fs_entry *ent = fsc_read(crawl);
if (!ent)
break;
printf("%s%s", ent->base, ent->name);
if (ent->dir)
printf("/\n");
else
printf("\n");
c_ent++;
}
printf("%i Entries\n", c_ent);
return 0;
}