Yet Another Programming Blog – Me again, and again with enumeration techniques. In this post I will try to coven a very common problem all programmers have to face one time or another: enumerating all files recursively in a directory. Yesterday I had to do it again, and again following the standard FindFirst … FindNext and FindClose pattern. So I decided to make my life easier and use enumerators for that. Behold the results: var S: String; begin for S in TDirectory.Entries('I:', true) do WriteLn(S); end; That’s all you have to do to traverse the directory structure for the I:\ drive — ...
Visits by Source
Users who voted for this posting