动态尿路感染稳定吗?
我的文件格式没有声明 UTI,因此 Launch Services 已为其分配了动态 UTI (dyn.ah62d4rv4ge81g23wsmw1a5dbte
)。我无法控制这些文档的 UTI。
我也想为该格式开发一个快速查看生成器,并且快速查看生成器仅依赖于文档 UTI,并且会忽略其属性列表中存在的任何其他类型的文档标识(例如创建者代码和扩展名)。
在开发人员添加动态 UTI 之前,我使用动态 UTI 是否安全?这些是否是由稳定的算法生成的,该算法很有可能为另一台计算机上的相同文件返回相同的 UTI?
I have files of a format that has no declared UTI, so Launch Services has assigned to it a dynamic UTI (dyn.ah62d4rv4ge81g23wsmw1a5dbte
). I have no control over the UTI of these documents.
It also happens that I would like to develop a Quick Look generator for that format, and that Quick Look generators only rely on the document UTI, and will ignore any other kind of document identification present in their property list (such as the creator code and the extension).
Is it safe for me to use the dynamic UTI until the developer adds one? Are those generated by a stable algorithm that has good chances of returning the same UTI for the same files on another machine?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,动态 UTI 是稳定的,甚至包括有关文件内容的信息。实际上是“dyn”之后的随机代码。是已知类型信息的 Base 32 编码。
本文 作者:Alastair Houghton 详细解释了这一点。 (不幸的是,这是在您发布问题几个月后写的:-)但这可能对其他人有帮助。)
Yes, dynamic UTIs are stable and even include information about the file content. Actually the random looking code after 'dyn.' is a base 32 encoding of the known type information.
This article by Alastair Houghton explains that in detail. (Unfortunately this was written several months after you posted your question :-) But it might help others.)
动态 UTI 显然是以确定性方式生成的,这使得它们成为跨不同 Mac 的可行标识符。
因此,对插件包使用动态 UTI 是安全的。
Dynamic UTIs are apparently generated in a deterministic way that makes them viable identifiers across different Macs.
So, it's safe to use a dynamic UTI for plugin bundles.