Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个过程可以修改带有覆盖的文件上的图标。不过,Finder 似乎正在缓存它生成的图像,这有时会发生在我生成叠加层之后(在图标是文件预览而不是普通图标的情况下)。
有没有一种编程方式可以告诉 Finder 转储其缓存以获取图标图像,然后重新创建它,而不更改文件信息,特别是修改日期?
检查:NSWorkspace 类参考
像这样刷新 Finder:
[[NSWorkspace sharedWorkspace] noteFileSystemChanged:path];