1 /*
2  * Copyright 2017 LarsGit223
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  */
18 
19 #ifndef GP_UTILS_FILELIST_H
20 #define GP_UTILS_FILELIST_H
21 
22 #include <glib.h>
23 
24 G_BEGIN_DECLS
25 
26 typedef enum
27 {
28 	FILELIST_FLAG_ADD_DIRS = 1,
29 }FILELIST_FLAG;
30 
31 GSList *filelist_get_precompiled_patterns(gchar **patterns);
32 gboolean filelist_patterns_match(GSList *patterns, const gchar *str);
33 GSList *gp_filelist_scan_directory(guint *files, guint *folders, const gchar *searchdir, gchar **file_patterns,
34 		gchar **ignored_dirs_patterns, gchar **ignored_file_patterns);
35 GSList *gp_filelist_scan_directory_full(guint *files, guint *folders, const gchar *searchdir, gchar **file_patterns,
36 		gchar **ignored_dirs_patterns, gchar **ignored_file_patterns, guint flags);
37 gboolean gp_filelist_filepath_matches_patterns(const gchar *filepath, gchar **file_patterns,
38 		gchar **ignored_dirs_patterns, gchar **ignored_file_patterns);
39 GSList *gp_filelist_scan_directory_callback(const gchar *searchdir,
40 	void (*callback)(const gchar *path, gboolean *add, gboolean *enter, void *userdata),
41 	void *userdata);
42 
43 G_END_DECLS
44 
45 #endif /* GP_UTILS_FILELIST_H */
46