CompuServe Messages

AmigaDos questions

#: 28186 S7/ProgrammingForum unknown
    28-Jul-86 08:03:20
Fm: Mark Skapinker (Batterie 76703,207
To: steve poling 70177,1434

This message turned up in search, but its forum couldn’t be identified from the original transcript, so it may not be linked into its thread.

I think you almost had your recursive solution from the sounds of it. The key is to save the context as you suggested. Each time you find a new directory and are going to call Examine(), you must allocate a new block of memory for your FileInfoBlock. When the end of the directory is encountered and you are going back down the tree one level, de-allocate the block and start using the previously allocated block that you were using for the directory. It's pretty slick and easy and actually works under MS-DOS. I haven't tried it on the Amiga, but it should work.