开发者

How to tell if a Windows folder has content-indexing enabled?

I am looking for a Windows API that I can call from Delphi 2开发者_如何转开发010 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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜