Hello Robert,
Thanks for reply which is is clear. I am writing a backup routine which
'Saves Directorys' but another program I am comparing it to 'Saves Directorys'
as well as 'Recurse Directories' how would that be interpreted insofar as
backups are concerned?
Would it mean that if the 'Saves Directories' were checked that it would save
the directories as the filesystem streams through all the files. Maybe the
'Recurse directories' saves the files all as one bunch in each directory until
that directory is completed - do you think?
Thanks,
Al+


Friday, October 25, 2002, 3:30:36 PM, you wrote:
>> Can anyone pse explain what directory recursion means?

RM> Im not a recusion expert but I hope the following shed some light :)

RM> If you were searching directories for a file or building a list of all files
RM> in a directory you would want to look first in the base folder and then each
RM> sub folder and their subfolders etc etc until you find the file or run out
RM> of folders to search.

RM> The easiest way to do this (that I know of) is to use a recursive procedure.
RM> A recursive procedure is a procedure that calls itself.  Obviously this can
RM> cause problems (like stack overflows) if the procedure gets stuck in a loop.

RM> example

RM> function FindFile(FileName, Directory : String) : Boolean;
RM> begin

RM> //Is file in current dir

RM> //Call FindFile for each directory in he specified directory until all have
RM> been checked or the file is found

RM> end;


RM> Not a great example but I hope this illustrates simple recursion.

RM> Rob

RM> Software engineer
RM> Wild Software Ltd
RM> Ph 03 338-1407
RM> ----- Original Message -----
RM> From: "Alistair George" <[EMAIL PROTECTED]>
RM> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
RM> Sent: Friday, October 25, 2002 2:51 PM
RM> Subject: [DUG]: Recursion - directories


>> Can anyone pse explain what directory recursion means?
>> Tks,
>> Al+
>>
>> --------------------------------------------------------------------------
RM> -
>>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>>                   Website: http://www.delphi.org.nz
>> To UnSub, send email to: [EMAIL PROTECTED]
>> with body of "unsubscribe delphi"
>> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>>


RM> ---------------------------------------------------------------------------
RM>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
RM>                   Website: http://www.delphi.org.nz
RM> To UnSub, send email to: [EMAIL PROTECTED] 
RM> with body of "unsubscribe delphi"
RM> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/


-- 
Regards,
 Alistair+

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to