开发者

How to programatically tell the Mac Finder to redraw a folder or file icon?

I have a process that modifies icons on files with an overlay. The Finder, though, seems to be caching the images it generates, which sometimes happens after I generate the overlay (in the case of the icon being a preview of the file instead of a plain icon).

Is there a programatic way I can tell the Finder to dump its cache for an icon image, and recreate it, without changing the file information, specifically the modification date?开发者_如何转开发


Check: NSWorkspace Class Reference

Refresh the Finder like this:

[[NSWorkspace sharedWorkspace] noteFileSystemChanged:path];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜