[Overview][Constants][Types][Procedures and functions][Variables] |
Dispose resources allocated by a FindFirst/FindNextsequence.
Source position: dosh.inc line 111
procedure FindClose( |
var f: SearchRec |
); |
FindClosefrees any resources associated with the search record F.
This call is needed to free any internal resources allocated by the FindFirstor FindNextcalls.
The unix implementation of the dos unit therefore keeps a table of open directories, and when the table is full, closes one of the directories, and reopens another. This system is adequate but slow if you use a lot of searchrecs.
So, to speed up the findfirst/findnext system, the FindClosecall was implemented. When you don't need a searchrecany more, you can tell this to the dos unit by issuing a FindClosecall. The directory which is kept open for this searchrecis then closed, and the table slot freed.
Remark: | It is recommended to use the linux call Globwhen looking for files on linux. |
Errors are reported in DosError.
|
Start search for one or more files. |
|
|
Find next matching file after FindFirst |