我为我的 OS X(10.7.3) 创建了一项服务。我已经在 info.plist 中配置它,如下所示:
<dict>
<key>NSServices</key>
<array>
<dict>
<key>NSMenuItem</key>
<dict>
<key>default</key>
<string>Edit the file...</string>
</dict>
<key>NSMessage</key>
<string>runWorkflowAsService</string>
<key>NSRequiredContext</key>
<dict>
<key>NSApplicationIdentifier</key>
<string>com.apple.finder</string>
</dict>
<key>NSSendFileTypes</key>
<array>
<string>public.item</string>
</array>
</dict>
</array>
</dict>
它对于 Finder 中的任何“文件和文件夹”(public.item)都是可见的,但我想让一些具有特殊数据类型的文件(例如 *.txt、*.rar)不可见。
有什么方法可以配置 info.plist 来完成它?