Re: [AD] About findfirst (2)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]



On Mon, 27 Aug 2001, Eric Botcazou wrote:

> > But it's emulated using stat() (and looking for '.' for FA_HIDDEN). Why
> > don't we make support function (modified internals of _alemu_findnext()):
>
> We could of course factor the file attribute emulation as you are proposing.
> However I'd rather not do so because:
> - that would mean restoring the _al_file_exists() internal function only for
> this purpose,
> - the platform-specific files src/dos/dfile.c, src/win/wfile.c and
> src/misc/ufile.c [and hopefully src/mac/mfile.c soon] have now got  a very
> similar structure (I coded them simultaneously) and I don't want to break
> the symmetry.

But why you'll have to search whole directory (worst case) in order to see
if some file exists? It's wasting of time. Let the OS (not DOS, but true
OS :-) handle it. That function is not crucial, but these DOS-isms (like
whole FA_* attribs thing) makes me sad :-( But never mind, I give up.

Have a nice day.

Stepan Roh



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/