apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@rkbloom.net
Subject Re: apr_file_glob?
Date Wed, 03 Mar 2004 00:24:32 GMT
Quoting Sander Striker <striker@apache.org>:

> On Tue, 2004-03-02 at 19:13, rbb@rkbloom.net wrote:
> > I need a way to expand a wildcard string within a program.  Normally I
> would use
> > glob for this, but since I am mainly working on Windows, that won't work. 
> So, I
> > would like to suggest apr_file_glob as a adjunct to apr_fnmatch.  Assuming
> there
> > are no arguments against this, I will work up a patch over the next few
> days for
> > Windows and possibly Unix.
> You may want to look at the implementation in Subversion.  Usually there
> is no problem getting common code integrated back into APR.

I am looking in subversion right now, and the only function that I can see
quickly is svn_cstring_match_glob_list, which is close, but isn't really what I
want.  This function takes a glob string a list of strings to match against. 
What I want is a function that takes a glob string and a directory name, and
returns a list of all of the files in that directory that match the glob string.

Am I missing the subversion function you are talking about?  Or do I need to
write what I want.  I agree that what you have pointed me at is a good first
step, but it is kind of backwards, because it is forcing me to find all of the
files in the directory and then weed out the ones I don't want.


View raw message