recursion limit when creating file list of harddrive

JB sundown at pacifier.com
Tue Oct 27 14:14:25 EDT 2015


Thank you, Geoff

JB


> On Oct 27, 2015, at 9:18 AM, Geoff Canyon <gcanyon at gmail.com> wrote:
> 
> Revised. Now in function form, with error checking and depth control. You
> can hand in a positive number to get that number of layers deep, or a
> negative number to go all the way down. I tested it on my home directory
> and it came back fine (after some time). I haven't (knowingly) tested with
> unusual characters.
> 
> on mouseUp
>   put directoryListing(fld "directory",round(the thumbposition of
> scrollbar "depth")) into field "listing"
> end mouseUp
> 
> function directoryListing whatFolder,c
>   put whatFolder & cr into R
>   set the directory to whatFolder
>   if c = 0 or the result is not empty then return R
>   put the files into tFileList
>   sort tFileList
>   replace cr with cr & whatFolder & "/" in tFileList
>   put whatFolder & "/" & tFileList & cr after R
>   put line 2 to -1 of the folders into tDirList
>   sort tDirList
>   repeat for each line L in tDirList
>      put directoryListing((whatFolder & "/" & L),(c-1)) after R
>   end repeat
>   return R
> end directoryListing
> 
> 
> On Mon, Oct 26, 2015 at 12:00 AM, Geoff Canyon <gcanyon at gmail.com> wrote:
> 
>> On Sat, Oct 24, 2015 at 7:28 PM, Matthias Rebbe | M-R-D <
>> matthias_livecode_150811 at m-r-d.de> wrote:
>> 
>>> I am using a script snippet which was posted by Scott Rossi to the list
>>> and was originally from Geoff Canyon in 2002.
>>> http://lists.runrev.com/pipermail/metacard/2002-August/002274.html
>>> 
>> 
>> Man, do I hate looking at my old code...
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 





More information about the use-livecode mailing list