Re: Parsing config files in a directory

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: Parsing config files in a directory
Дата
Msg-id alpine.GSO.2.01.0910260020550.1748@westnet.com
обсуждение исходный текст
Ответ на Re: Parsing config files in a directory  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Parsing config files in a directory
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Parsing config files in a directory