Re: Parsing config files in a directory - Mailing list pgsql-hackers

From Greg Smith
Subject Re: Parsing config files in a directory
Date
Msg-id alpine.GSO.2.01.0910260020550.1748@westnet.com
Whole thread Raw
In response to Re: Parsing config files in a directory  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@gregsmith.com http://www.gregsmith.com Baltimore, MD


pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: Parsing config files in a directory
Next
From: Josh Berkus
Date:
Subject: Re: Parsing config files in a directory