on 3/16/06 7:56 PM, "Joseph J. Strout" <[EMAIL PROTECTED]> wrote:
> Message: 23 > Subject: Re: List of all files and folders for a given volume > From: "Joseph J. Strout" <[EMAIL PROTECTED]> > Date: Thu, 16 Mar 2006 20:56:12 -0700 > > 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 Hi, Joe-- Thanks. I found it and it looks like it's working great :) All My Best, Jeffrey _______________________________________________ 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>
