summaryrefslogtreecommitdiff
path: root/src/scanner.c
diff options
context:
space:
mode:
author@syxhe <https://t.me/syxhe>2025-06-09 15:03:19 -0500
committer@syxhe <https://t.me/syxhe>2025-06-09 15:03:19 -0500
commit534a492f2c0bcceac52a287b03dc1ff5eb0b0763 (patch)
tree0869f59e77d5b127b84e2a22015148ce9a8a3c98 /src/scanner.c
parent08fb644c7d101551edfe8fc2608e0ac501b3df9f (diff)
Trim more fat, add some doxygen markup to the threadpool functions
Diffstat (limited to 'src/scanner.c')
-rw-r--r--src/scanner.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/scanner.c b/src/scanner.c
deleted file mode 100644
index 2ffbea4..0000000
--- a/src/scanner.c
+++ /dev/null
@@ -1,37 +0,0 @@
1#define _GNU_SOURCE
2#include "shared.h"
3
4#include "scanner.h"
5
6#include <stdlib.h>
7#include <dirent.h>
8#include <string.h>
9#include <errno.h>
10#include <error.h>
11
12// dlinkedlist * scandirlist(const char * const dir, int (*selector)(const struct dirent *), int (*cmp)(const struct dirent **, const struct dirent **)) {
13// if(!dir || selector == NULL || cmp == NULL) ERRRET(EINVAL, NULL);
14
15// struct dirent **namelist = NULL;
16// dlinkedlist *list = NULL;
17// int numentries = -1;
18
19// if((numentries = scandir(dir, &namelist, selector, cmp)) < 0)
20// ERRRET(errno, NULL);
21
22// list = dlinkedlist_init();
23// for(int i = 0; i < numentries; i++)
24// if(dlinkedlist_append(list, (void *)(namelist[i]), free) < 0) {
25// dlinkedlist_free(list);
26// for(int j = i; j < numentries; j++)
27// free(namelist[j]);
28
29// free(namelist);
30// ERRRET(errno, NULL);
31// }
32// free(namelist);
33
34// return list;
35// }
36
37// TODO: Rewrite this to use the threadpool. Each newly scanned file should be pushed onto the threadpool as an encryption task \ No newline at end of file