How to check whether directories with a given extension are shown by the Finder as a package?
问题 For a given extension, how do you check whether directories with that extension will be shown by the Finder as a package? I figured the method below is an effective implementation for this, but creating a temporary directory feels like a hack. I'm guessing I should be able to implement this properly through the Launch Services API, but I can't quite figure out how to do it (I might be overlooking the obvious though). // Extension method on NSWorkspace @implementation NSWorkspace