Re: [AD] [TODO] About findfirst

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


> The main problem with `for_each_file' is that it's awkward to use.
> Mostly this is imposed by C, but `for_each_file' is just not the
> right interface for C.

After thinking a little more about that ;-) I think you're right: the find*
set of functions is more straightforward to use in many circumstances.

Actually my main complaint is against the design of this mini-API. The file
functions are built on top of a platform abstraction layer:

API level                for_each_file(),  file_size(), file_time()
                                                        |
abstraction layer    _al_findfirst(), _al_findnext(), _al_findclose()
                                                        |
platform-dep level    findfirst(), findnext(), findclose() for DJGPP
                             _findfirst(), _findnext(), _findclose() for Win
                              emulated find* set for Unixes, MacOS etc

I find it a little wasteful to require the emulation of a platform dependent
set of functions while we have already an abstraction layer on top of it !

---
Eric Botcazou
ebotcazou@xxxxxxxxxx



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