The
glob() won't find hidden files on Windows, either. Thus, the concepts are portable. If you need hidden files also, you should use an
opendir() approach instead, and this goes for all platforms.
I see the shell hack ".??*" a lot, but it has a nasty bug in there: it ignores directories or files that have names like ".a" or ".3". While this may seem like a rare case, there's a huge difference between making something that will break rarely, and making something that will work completely consistently. Just imagine trying to figure out why that directory didn't get added to a backup tape, and of course, it's too late when you discover this.
Regarding your other comment about filename extensions, Windows FAT always has an extension, even if it is blank. The string "*." is not the same thing as the string "*"; a call to "*." would get all files with no extension (and no visible period) on Windows, while it would get all files which end in period on Un*x.
--
[ e d @ h a l l e y . c c ]