[DGD] get_dir() oddity

bart at wotf.org bart at wotf.org
Thu Dec 20 18:23:00 CET 2007


You are right, and I was careless in my expression. Just didn't realize, and
actually somewhat dislike [] globbing. What I dislike in this case is that
get_dir() sees [ as part of a glob even when it is never closed. I had
expected get_dir() to only use wildcards.

On Thu, 20 Dec 2007 08:28:50 -0800, Shentino wrote
> Funny, I always thought that filesystem wildcards were of the *glob* 
> variety...
> 
> *scratches head*
> 
> On Dec 17, 2007 6:26 PM,  <bart at wotf.org> wrote:
> > Duh, sorry for replying to my own message but..
> >
> > Seems the pattern part of get_dir() can be a regular expression and reserves [
> > Guess I missed that somewhere.
> >
> > Bart.
> >
> > On Tue, 18 Dec 2007 03:05:29 +0100, bart wrote
> >
> > > Somewhere on my filesystem there is a file /cmd/comm/[@.c
> > > Trying to do a compile_file() on it works fine, but a get_dir() somehow
> > > doesn't work as expected.
> > >
> > > ie get_dir("/cmd/comm/*") shows the file but
> > > get_dir("/cmd/comm/[@.c") returns an empty array. On any other file
> > > it returns the filename, size and time as array as expected.
> > >
> > > Something like get_dir("/cmd/comm/?@.c") also shows the file.
> > >
> > > That is the driver implementation of get_dir() btw.
> > >
> > > Any ideas why this is? Its specific to the [ in the name it seems.
> > >
> > > Bart.
> > > --
> > > Created with Open WebMail at http://www.bartsplace.net/
> > > Read my weblog at http://soapbox.bartsplace.net/
> > >
> > > ___________________________________________
> > > https://mail.dworkin.nl/mailman/listinfo/dgd
> >
> >
> > --
> > Created with Open WebMail at http://www.bartsplace.net/
> > Read my weblog at http://soapbox.bartsplace.net/
> >
> > ___________________________________________
> > https://mail.dworkin.nl/mailman/listinfo/dgd
> >
> ___________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd


--
Created with Open WebMail at http://www.bartsplace.net/
Read my weblog at http://soapbox.bartsplace.net/




More information about the DGD mailing list