At 7:28 PM -0800 3/16/06, Jeffrey Ellis wrote:
I'm trying to get a complete list of all files and folders that exists on a
given volume, as many levels down as they may go, and whether they're
invisible or not, and, if possible, even if they are contained as part of an
application's package contents, i.e. -- everything.
Is there a way to do this?
Sure. If you search the archives for "recursion" you'll probably
find several implementations of this -- it's the classic example of a
recursive algorithm.
In brief, you make a function that processes a folder, by iterating
over all the items it contains. For any item that's a folder, the
function calls itself, passing in that item. (Or you can do it by
maintaining a to-do list in the form of an array, and when you find a
folder, you add it to your to-do list, and keep going until the to-do
list is empty.)
Best,
- Joe
--
Joseph J. Strout
[EMAIL PROTECTED]
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>