views:

81

answers:

1

I am looking for a Windows API that I can call from Delphi 2010 which will allow my application to determine if a specific folder has content-indexing enabled. In other words whether there is a tick in the checkbox named 'Allow files in this folder to have contents indexed in addition to file properties' which is in the Advanced Attributes page of the Property dialog when you right-click the folder. I cannot find much about this on MSDN, but maybe I am not looking in the right places.

+2  A: 
function IsFolderIndexed(const folderName: string): boolean;
begin
  Result := (GetFileAttributes(folderName) AND $2000) = 0;
end;

Ref: http://msdn.microsoft.com/en-us/library/ee332330(VS.85).aspx

gabr
You still cannot know if indexing is "on", if it rturns false, you only know that indexing has been disabled.
Ritsaert Hornstra
Agree, but that's the best info I could find.
gabr
I can't believe I looked in that table and didn't see it! Thanks.
frogb