aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/util.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-26 13:59:25 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-26 13:59:25 +0100
commit3372fed16cf394202c365909b49f01e219fc1116 (patch)
tree7f4a940e80118da4b3bbfc9b2379cdae7db3ce0d /src/libutil/util.h
parent0d9b0b03edcfef64580123067aade23575e093c4 (diff)
downloadrspamd-3372fed16cf394202c365909b49f01e219fc1116.tar.gz
rspamd-3372fed16cf394202c365909b49f01e219fc1116.zip
[Minor] Add generic routine for glob patterns
Diffstat (limited to 'src/libutil/util.h')
-rw-r--r--src/libutil/util.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libutil/util.h b/src/libutil/util.h
index 6470b5c45..96e85af30 100644
--- a/src/libutil/util.h
+++ b/src/libutil/util.h
@@ -498,4 +498,17 @@ void rspamd_localtime (gint64 ts, struct tm *dest);
*/
gboolean rspamd_fstring_gzip (rspamd_fstring_t **in);
+/**
+ * Perform globbing searching for the specified path. Allow recursion,
+ * returns an error if maximum nesting is reached.
+ * @param pattern
+ * @param recursive
+ * @param err
+ * @return GPtrArray of gchar *, elements are freed when array is freed
+ */
+GPtrArray *rspamd_glob_path (const gchar *dir,
+ const gchar *pattern,
+ gboolean recursive,
+ GError **err);
+
#endif