+ DirectoryExists now closes findfirst handle

This commit is contained in:
michael 2004-01-16 20:53:33 +00:00
parent 143b3f4c05
commit 7c7dd809bf

View File

@ -213,11 +213,13 @@ var
Handle: THandle; Handle: THandle;
FindData: TWin32FindData; FindData: TWin32FindData;
begin begin
Result:=False;
Handle := FindFirstFile(Pchar(Directory), FindData); Handle := FindFirstFile(Pchar(Directory), FindData);
Result:=(Handle <> INVALID_HANDLE_VALUE) and If (Handle <> INVALID_HANDLE_VALUE) then
((FindData.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY) = FILE_ATTRIBUTE_DIRECTORY); begin
If Result then Result:=((FindData.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY) = FILE_ATTRIBUTE_DIRECTORY);
Windows.FindClose(Handle); Windows.FindClose(Handle);
end;
end; end;
@ -788,7 +790,10 @@ Finalization
end. end.
{ {
$Log$ $Log$
Revision 1.29 2004-01-10 17:40:25 michael Revision 1.30 2004-01-16 20:53:33 michael
+ DirectoryExists now closes findfirst handle
Revision 1.29 2004/01/10 17:40:25 michael
+ Added Sleep() function + Added Sleep() function
Revision 1.28 2004/01/05 22:56:08 florian Revision 1.28 2004/01/05 22:56:08 florian