Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Reading directories faster.

From: petr:krenzelok:trz:cz at: 8-Oct-2002 22:21

alan parman wrote:
>I am using the code below to read and sort the current directory contents. > >It is _terribly_ slow on large directories (> 1000 files/directories) > >either none? df: attempt [read %./][ > "Error reading Directory" >][ > foreach file df [insert tail either (dir? file)[dirs][files] file] >] >
I am not sure you can. some time ago I requested RT to add ability to load/dirs load/files refinements or something like that, but even ppl here argued rebol is fast enough, which is not true on larger and especially network drives - quite unusable. But it was some two years ago. Maybe you could look at new native called 'remove-each? For further description go here: http://www.reboltech.com/downloads/changes.html#sect4.4. There is quite the example you are looking for - but if you want to get list of files and directories - you will have to copy original block, and then run it two times - once for files, second time for dirs .. Let us know if the result is faster now ... -pekr-