summaryrefslogtreecommitdiff
path: root/src/search.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/search.h')
-rw-r--r--src/search.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/search.h b/src/search.h
index 9a5a086..8b5f502 100644
--- a/src/search.h
+++ b/src/search.h
@@ -1,12 +1,19 @@
1#ifndef __SLOTS__SEARCH_H__1863390513307 1#ifndef __SLOTS__SEARCH_H__4612270218569
2#define __SLOTS__SEARCH_H__1863390513307 2#define __SLOTS__SEARCH_H__4612270218569
3 3
4#include <sys/types.h>
4#include <dirent.h> 5#include <dirent.h>
5 6
6// scandir filter: filter out anything that isn't a directory 7// Wrapper for stat's S_ISDIR(mode) macro. Implemented as: return S_ISDIR(mode)
7int folderonly(const struct dirent64 *tester); 8int S_ISDIR_WRAPPER(mode_t mode);
9
10// Wrapper for stat's S_ISREG(mode) macro. Implemented as: return S_ISREG(mode)
11int S_ISREG_WRAPPER(mode_t mode);
12
13// Sort out nodes in a scanned directory using one of stat's S_IS--- functions
14int nodesort(const struct dirent *node, int (*S_IS_CALLBACK)(mode_t));
15int foldersort(const struct dirent *node); // Only display folders when using scandir
16int filesort(const struct dirent *node); // Only display files when using scandir
8 17
9// scandir filter: filter out anything that isn't a regular file
10int fileonly(const struct dirent64 *tester);
11 18
12#endif \ No newline at end of file 19#endif \ No newline at end of file