How to programmatically scan a Mac Finder to redraw a folder or file icon?

I have a process that changes the icons in overlay files. However, Finder seems to cache the images they create, which sometimes happens after the overlay is created (in the case where the icon is a file preview, not a simple icon).

Is there a programmatic way in which Finder can unload its cache for the icon image and recreate it without changing the file information, in particular the date of the change?

+3
source share
1 answer

Note: NSWorkspace class reference

Update Finder as follows:

[[NSWorkspace sharedWorkspace] noteFileSystemChanged:path];
+3
source

All Articles