Article View: comp.sys.amiga.tech
Article #13285Walking a file tree (Was: Memory allocation)
From: Mike (With friends like these, w...
Date: Tue, 02 Jan 1990 23:14
Date: Tue, 02 Jan 1990 23:14
22 lines
1797 bytes
1797 bytes
>> If you can get around using a recursive function then by all means so
>> so. I had a routine that scanned a dir and did various things that
>> needed a stack of 30k to work with my HD (I have some rather sever
>> levels of directory depth in some places...). I re-wrote the routine
>> inside a big for(;;) {} loop adding a couple of variables to make it
>> `think' it was recursive and now the same program will work just dandy
>> with a 4000 byte stack (the AmigaDOS default).
I wrote a generic non-recursive routine for walking file trees a while
back. It's modelled after the ftw & ftwalk routines from Unix. Last
time I looked, it could be ftp'ed off of ucbvax.berkeley.edu, along
with a command-line interface modelled after ftw from v8, complete
with ARexx interface and sample scripts. There are also some timings
of a beta version against programs with hand-coded file tree walking
routines. The file was pub/amiga/treewalk.tar.Z.
<mike
--
Come all you rolling minstrels, Mike Meyer
And together we will try, mwm@berkeley.edu
To rouse the spirit of the air, ucbvax!mwm
And move the rolling sky. mwm@ucbjade.BITNET
Technical Details
Message-ID:
<MWM.90Jan2151458@raven.pa.dec.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!wuarchive!decwrl!granite.pa.dec.com!mwmReferences:
<Dec.30.13.09.02.1989.28450@topaz.rutgers.edu> <2617@jolnet.ORPK.IL.US>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!wuarchive!decwrl!granite.pa.dec.com!mwm From: mwm@raven.pa.dec.com (Mike (With friends like these, who needs hallucinations) Meyer) Newsgroups: comp.sys.amiga.tech Subject: Walking a file tree (Was: Memory allocation) Message-ID: <MWM.90Jan2151458@raven.pa.dec.com> Date: 2 Jan 90 23:14:58 GMT References: <Dec.30.13.09.02.1989.28450@topaz.rutgers.edu> <2617@jolnet.ORPK.IL.US> Sender: news@decwrl.dec.com Organization: Missionaria Phonibalonica Lines: 22 In-reply-to: caw@jolnet.ORPK.IL.US's message of 31 Dec 89 01:03:55 GMT