4
votes
Vote UpVote

Enumerating over a directory structure

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 — ...
Favorite? Off-Topic? alex @ 2009-06-12 15:39

Statistics

Visits: 533
Votes: 4
Favorites: 1
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

LachlanG
Neville Cook
PhiS>
Sergio
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)