问题
I am working on Finder Sync extension to apply badges on files and folders ...
I want to refresh icon for particular file/folder in Finder application. is there any way to refresh a finder window programmatically on mac OS Yosemite ???
Apart from creating and deleting a file...
回答1:
I had this problem too. I had a .app i wanted to change the icon of.
Structure of my .app:
...noida.app/...noida.app/Contents/...
...noida.app/Contents/Resources...noida.app/Contents/Resources/myicon.icns
...noida.app/Contents/MacOS...
...noida.app/Contents/plist.Info
Now I would change the icon in the resources folder. Then I made new files in all folders. It wouldn't work. The only place that i could make a new file tha twould update the icon was in the ...noida.app/ so i made new file at ...noida.app/junk folder and then it updated.
Very interesting.
来源:https://stackoverflow.com/questions/27799116/finder-window-refresh-issue-yosemite