/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2012 Index Data.
+ * Copyright (C) 1995-2013 Index Data.
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/** \file
+/** \file
\brief File globbing (ala POSIX glob, but simpler)
*/
/** \brief file glob handle */
typedef struct glob_res *yaz_glob_res_t;
+#define YAZ_FILE_GLOB_FAIL_NOTEXIST 1
/** \brief perform glob
\param pattern glob pattern file spec
YAZ_EXPORT
int yaz_file_glob(const char *pattern, yaz_glob_res_t *res);
+/** \brief perform glob (with flags)
+ \param pattern glob pattern file spec
+ \param res returned glob result
+ \param flags YAZ_FILE_GLOB_.. flags
+ \retval 0 OK
+ \retval -1 ERROR
+*/
+YAZ_EXPORT
+int yaz_file_glob2(const char *pattern, yaz_glob_res_t *res, unsigned flags);
+
/** \brief release glob result
\param res pointer to glob result
-
+
A value of *res == NULL is allowed. If *res != NULL, then
*res is set to NULL
*/