Mail Archives: djgpp/1997/05/01/15:17:47
> AFAICS, the glob function from libc in DJGPP ver. 2.01 can't return
> hidden file/directory names (from a DOS file system).
Yes, that's correct. This is so hidden files/directories aren't found by
the command-line globbing, exactly as it works on Unix.
> Is there some work-around? Or, at least to be improved in next release
> of DJGPP?
This is not a bug, it's a feature, so it probably will stay, unless
enough people complain about it (and give serious reasons).
As to work-arounds, it depends on the specific application. Would you
care to explain more what are you using `glob' for?
-----------------------------------------------------------------------
Robert,
What I do may be lengthy, but it gets around this. I get the
current directory (if the user switches dirs in the path, I change the
directory and then continue) and then I do a findfirst/findnext
and then match it to the request I am looking for. If it is
"*.*" or "*" I grab them all. If it is "a*" for example, I match
the filename to the pattern I am searching for that I pass in. This
allows me to match dirs/hidden files/etc...
It probably isn't the best way to do it, but I have to do
other things to that force me to do it this way. It may sound very
lengthy or difficult but it isn't really! It can all be done in a few
lines of code really.
If you want, email me, and I'll send you a piece of my code
that shows how I did this.
Paul Campisi
- Raw text -