delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/02/18/03:10:36

Date: Thu, 18 Feb 1999 10:08:51 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Tom St Denis <tomstdenis AT goplay DOT com>
cc: djgpp-workers AT delorie DOT com
Subject: Re: find_first
In-Reply-To: <36381280.5.28477@mx1-12.onmedia.com>
Message-ID: <Pine.SUN.3.91.990218100828.3649H-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

On Wed, 17 Feb 1999, Tom St Denis wrote:

> 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.

I'd suggest to use `glob'.  It is Posix, and returns all the files
which match a pattern in a single call.  However, if by ``ms-dos'' you
mean something other than DJGPP only, then you need to know that other
DOS compilers don't have `glob'.

Also note that the semantics of the file wildcards is different on DOS
and Unix.  For example, "*.*" will yield different results.

> (btw, I don't get news group access here right now, so I can't use
> c.o.m.d)

You can write to the email gateway, djgpp AT delorie DOT com.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019