From: | Greg Smith <gsmith(at)gregsmith(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Magnus Hagander <magnus(at)hagander(dot)net>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Parsing config files in a directory |
Date: | 2009-10-26 04:34:46 |
Message-ID: | alpine.GSO.2.01.0910260020550.1748@westnet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, 25 Oct 2009, Tom Lane wrote:
> Some poking around suggests that glob(3) is reasonably portable
> across Unixen, but is it provided on Windows?
You can probably use FindFirstFile for that:
http://msdn.microsoft.com/en-us/library/aa364418%28VS.85%29.aspx
Standard UNIX-ish glob implementations aren't ideal for strings like
"C:\Program Files\stuff" anyway. More notes on this subject:
http://stackoverflow.com/questions/1269480/globbing-in-c-c-on-windows
http://coding.derkeiler.com/Archive/Perl/comp.lang.perl.misc/2008-03/msg01419.html
If you look at the Perl code providing a Windows-oriented glob:
http://cpansearch.perl.org/src/TATE/File-Glob-Windows-0.1.3/lib/File/Glob/Windows.pm
you can see it even worries about things like correctly handling the fact
that there's a current directory on each drive in Windows land.
--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2009-10-26 04:46:59 | Re: Parsing config files in a directory |
Previous Message | Greg Smith | 2009-10-26 04:18:13 | Re: Parsing config files in a directory |