Programming Question:
What is the best techinique to traverse a directory?
1. UNIX opendir() readdir()
2. SASC dnext() dfind()
3. AmigaOS Examine() ExNext()
4. AmigaOS ExAll()
Aargh! Decisions decisions!
I need to traverse some directories at high speed.
At first I was going to use the UNIX way of opendir() readdir() based on
the assumption that every C compiler in the universe has those
functions. BUT I can't figure out how to tell if it has returned a
FILEname or a DIRname? My old SASC manual seems to be missing that info.
Or maybe it just isn't possible under unix?
Then I noticed some old code that uses dnext() and dfind(). Very nice
and simple and great! BUT the manual says these only exist in SASC!
ARGH! I am trying to write multiplatform-friendly code!
So then I figured I could use AmigaOS routines. They should be the
fastest and smoothest under AmigaOS but I will have to completely rewrite
them when I port the game to SDL.
((
AND even if I use AmigaOS way of doing things... which technique should I
use? Examine() + ExNext() ? Or ExAll() ? Auugh!
How do I decide??