开发者

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

开发者 https://www.devze.com 2023-03-07 03:30 出处:网络
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

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

精彩评论

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