开发者

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

开发者 https://www.devze.com 2022-12-18 06:39 出处:网络
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

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

精彩评论

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

关注公众号