Subject: Re: find_first Date: Wed, 17 Feb 1999 14:06:09 -0800 Message-Id: <36388766.3.12430@mx1-11.onmedia.com> From: "Tom St Denis" To: DJ Delorie , djgpp-workers AT delorie DOT com MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com >> What is the ANSI C equivelant of 'find_first()' for finding files that >> match a pattern. I am writing a tool (in DJGPP) which must run in >> ms-dos and unix platforms. > >There is no exact equivalent. You'd have to use >opendir/readdir/closedir and a separate pattern match like regex, none >of which are ANSI (posix specifies them). (Looking for an opinion) Would it be better then, just to have the user do something like dir *.GIF > files or ls *.GIF > files Just wondering. Tom +--------------------------------------------------------------------------+ | The coolest site for free home pages, email, chat, e-cards, movie info.. | | http://www.goplay.com - it's time to Go Play! | +--------------------------------------------------------------------------+