extras/globbing.h
author Ryan C. Gordon <icculus@icculus.org>
Sat, 28 Mar 2009 18:14:16 -0400
changeset 977 5a2f49a5f804
parent 972 254427fc42ab
child 1024 199e38498938
permissions -rw-r--r--
Improved globbing extra. Fixed FIXMEs, improved documentation, updated for 2.1 API.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
573
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     1
/** \file globbing.h */
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     2
977
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
     3
#include "physfs.h"
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
     4
573
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     5
/**
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     6
 * \mainpage PhysicsFS globbing
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     7
 *
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     8
 * This is an extension to PhysicsFS to let you search for files with basic
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     9
 *  wildcard matching, regardless of what sort of filesystem or archive they
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    10
 *  reside in. It does this by enumerating directories as needed and manually
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    11
 *  locating matching entries.
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    12
 *
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    13
 * Usage: Set up PhysicsFS as you normally would, then use
977
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    14
 *  PHYSFSEXT_enumerateFilesWildcard() when enumerating files. This is just
573
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    15
 *  like PHYSFS_enumerateFiles(), but it returns a subset that matches your
977
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    16
 *  wildcard pattern. You must call PHYSFSEXT_freeEnumeration() on the results,
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    17
 *  just PHYSFS_enumerateFiles() would do with PHYSFS_freeList().
573
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    18
 *
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    19
 * License: this code is public domain. I make no warranty that it is useful,
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    20
 *  correct, harmless, or environmentally safe.
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    21
 *
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    22
 * This particular file may be used however you like, including copying it
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    23
 *  verbatim into a closed-source project, exploiting it commercially, and
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    24
 *  removing any trace of my name from the source (although I hope you won't
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    25
 *  do that). I welcome enhancements and corrections to this file, but I do
576
5da65f8e9a50 Switched to zlib license.
Ryan C. Gordon <icculus@icculus.org>
parents: 573
diff changeset
    26
 *  not require you to send me patches if you make changes. This code has
5da65f8e9a50 Switched to zlib license.
Ryan C. Gordon <icculus@icculus.org>
parents: 573
diff changeset
    27
 *  NO WARRANTY.
573
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    28
 *
576
5da65f8e9a50 Switched to zlib license.
Ryan C. Gordon <icculus@icculus.org>
parents: 573
diff changeset
    29
 * Unless otherwise stated, the rest of PhysicsFS falls under the zlib license.
972
254427fc42ab Moved directory structure around.
Ryan C. Gordon <icculus@icculus.org>
parents: 809
diff changeset
    30
 *  Please see LICENSE.txt in the source's "docs" directory.
573
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    31
 *
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    32
 *  \author Ryan C. Gordon.
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    33
 */
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    34
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    35
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    36
/**
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    37
 * \fn char **PHYSFS_enumerateFilesWildcard(const char *dir, const char *wildcard, int caseSensitive)
977
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    38
 * \brief Get a file listing of a search path's directory, filtered with a wildcard pattern.
573
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    39
 *
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    40
 * Matching directories are interpolated. That is, if "C:\mydir" is in the
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    41
 *  search path and contains a directory "savegames" that contains "x.sav",
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    42
 *  "y.Sav", and "z.txt", and there is also a "C:\userdir" in the search path
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    43
 *  that has a "savegames" subdirectory with "w.sav", then the following code:
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    44
 *
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    45
 * \code
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    46
 * char **rc = PHYSFS_enumerateFilesWildcard("savegames", "*.sav", 0);
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    47
 * char **i;
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    48
 *
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    49
 * for (i = rc; *i != NULL; i++)
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    50
 *     printf(" * We've got [%s].\n", *i);
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    51
 *
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    52
 * PHYSFS_freeList(rc);
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    53
 * \endcode
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    54
 *
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    55
 *  ...will print:
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    56
 *
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    57
 * \verbatim
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    58
 * We've got [x.sav].
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    59
 * We've got [y.Sav].
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    60
 * We've got [w.sav].\endverbatim
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    61
 *
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    62
 * Feel free to sort the list however you like. We only promise there will
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    63
 *  be no duplicates, but not what order the final list will come back in.
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    64
 *
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    65
 * Wildcard strings can use the '*' and '?' characters, currently.
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    66
 * Matches can be case-insensitive if you pass a zero for argument 3.
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    67
 *
977
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    68
 * Don't forget to call PHYSFSEXT_freeEnumerator() with the return value from
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    69
 *  this function when you are done with it. As we use PhysicsFS's allocator
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    70
 *  for this list, you must free it before calling PHYSFS_deinit().
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    71
 *  Do not use PHYSFS_freeList() on the returned value!
573
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    72
 *
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    73
 *    \param dir directory in platform-independent notation to enumerate.
977
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    74
 *    \param wildcard Wildcard pattern to use for filtering.
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    75
 *    \param caseSensitive Zero for case-insensitive matching,
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    76
 *                         non-zero for case-sensitive.
573
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    77
 *   \return Null-terminated array of null-terminated strings.
977
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    78
 *
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    79
 * \sa PHYSFSEXT_freeEnumeration
573
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    80
 */
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    81
__EXPORT__ char **PHYSFSEXT_enumerateFilesWildcard(const char *dir,
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    82
                                                   const char *wildcard,
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    83
                                                   int caseSensitive);
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    84
977
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    85
/**
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    86
 * \fn void PHYSFSEXT_freeEnumeration(char **list)
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    87
 * \brief Free data returned by PHYSFSEXT_enumerateFilesWildcard
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    88
 *
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    89
 * Conceptually, this works like PHYSFS_freeList(), but is used with data
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    90
 *  returned by PHYSFSEXT_enumerateFilesWildcard() only. Be sure to call this
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    91
 *  on any returned data from that function before
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    92
 *
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    93
 *    \param list Pointer previously returned by
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    94
 *                PHYSFSEXT_enumerateFilesWildcard(). It is safe to pass a
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    95
 *                NULL here.
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    96
 *
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    97
 * \sa PHYSFSEXT_enumerateFilesWildcard
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    98
 */
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
    99
__EXPORT__ void PHYSFSEXT_freeEnumeration(char **list);
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   100
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   101
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   102
/**
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   103
 * \fn void PHYSFSEXT_enumerateFilesCallbackWildcard(const char *dir, const char *wildcard, int caseSensitive, PHYSFS_EnumFilesCallback c, void *d);
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   104
 * \brief Get a file listing of a search path's directory, filtered with a wildcard pattern, using an application-defined callback.
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   105
 *
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   106
 * This function is equivalent to PHYSFSEXT_enumerateFilesWildcard(). It
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   107
 *  reports file listings, filtered by a wildcard pattern.
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   108
 *
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   109
 * Unlike PHYSFS_enumerateFiles(), this function does not return an array.
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   110
 *  Rather, it calls a function specified by the application once per
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   111
 *  element of the search path:
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   112
 *
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   113
 * \code
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   114
 *
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   115
 * static void printDir(void *data, const char *origdir, const char *fname)
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   116
 * {
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   117
 *     printf(" * We've got [%s] in [%s].\n", fname, origdir);
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   118
 * }
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   119
 *
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   120
 * // ...
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   121
 * PHYSFS_enumerateFilesCallbackWildcard("savegames","*.sav",0,printDir,NULL);
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   122
 * \endcode
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   123
 *
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   124
 * Items sent to the callback are not guaranteed to be in any order whatsoever.
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   125
 *  There is no sorting done at this level, and if you need that, you should
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   126
 *  probably use PHYSFS_enumerateFilesWildcard() instead, which guarantees
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   127
 *  alphabetical sorting. This form reports whatever is discovered in each
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   128
 *  archive before moving on to the next. Even within one archive, we can't
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   129
 *  guarantee what order it will discover data. <em>Any sorting you find in
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   130
 *  these callbacks is just pure luck. Do not rely on it.</em> As this walks
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   131
 *  the entire list of archives, you may receive duplicate filenames.
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   132
 *
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   133
 * Wildcard strings can use the '*' and '?' characters, currently.
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   134
 * Matches can be case-insensitive if you pass a zero for argument 3.
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   135
 *
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   136
 *    \param dir Directory, in platform-independent notation, to enumerate.
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   137
 *    \param wildcard Wildcard pattern to use for filtering.
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   138
 *    \param caseSensitive Zero for case-insensitive matching,
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   139
 *                         non-zero for case-sensitive.
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   140
 *    \param c Callback function to notify about search path elements.
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   141
 *    \param d Application-defined data passed to callback. Can be NULL.
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   142
 *
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   143
 * \sa PHYSFS_EnumFilesCallback
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   144
 * \sa PHYSFS_enumerateFiles
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   145
 */
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   146
__EXPORT__ void PHYSFSEXT_enumerateFilesCallbackWildcard(const char *dir,
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   147
                                              const char *wildcard,
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   148
                                              int caseSensitive,
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   149
                                              PHYSFS_EnumFilesCallback c,
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   150
                                              void *d);
5a2f49a5f804 Improved globbing extra.
Ryan C. Gordon <icculus@icculus.org>
parents: 972
diff changeset
   151
573
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   152
/* end of globbing.h ... */
01112353ffad First stab at globbing extension.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   153