Vote UpVote

FindFirst on OS X – two small tips

Delphi Haven – If using FindFirst/FindNext/FindClose when targeting OS X , there’s two things to keep in mind: To search for items with any name, use a mask of ‘*’ not ‘*.*’. If enumerating sub-directories and sub-directories of sub-directories, remember to check faSymLink or you may find yourself in an endless loop. The following code demonstrates getting both things right: procedure DoSearch(const Path, FileSpec: string); const SAnyMask = {$IFDEF MSWINDOWS}'*.*'{$ELSE}'*'{$ENDIF}; var Info: TSearchRec; begin //find files in the immediate directory... if ...
Favorite? Off-Topic? Chris Rolliston @ 2012-08-26 15:52


Visits: 543
Votes: 3
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


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