Le 2015/10/13 à 14:11, Thomas Fischer < email@hidden> a écrit :
Am 13.10.2015 um 13:16 schrieb Shane Stanley < email@hidden>: On 13 Oct 2015, at 10:04 PM, Thomas Fischer <email@hidden> wrote:
I tried that (the lsregister is at /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister on my machine).
But to no avail, the type identifier as given by System Events remains "dyn.age8u".
That's very strange. I get "public.folder" here; UTI's beginning with "dyn." are usually dynamically generated when no entry is found in the database.
yes, I find it strange (worrisome?) as well. I wonder which application actually defines the folders' UTI? Or, where in the database should I find the "public.folders"? So what happens if you run this on the folder:
use scripting additions use framework "Foundation" set thePath to POSIX path of (path to home folder) -- or any other folder set theNSURL to current application's class "NSURL"'s fileURLWithPath:thePath set {theResult, theValue} to theNSURL's getResourceValue:(reference) forKey:(current application's NSURLTypeIdentifierKey) |error|:(missing value) return theValue as text
This doesn't seem to run on Mavericks. It does on my Yosemite, but there I get "public.folder" from System Events anyway. Best regards Thomas Fischer
You may try to run :
do shell script "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump"
Be patient, it's needs some time.
I saw: -------------------------------------------------------- claim id: 12068 name: Folder rank: Default reqCaps: roles: Editor flags: apple-default apple-internal doc-type icon: bindings: public.folder, 'fold' -------------------------------------------------------- … -------------------------------------------------------- claim id: 16668 name: Folder rank: None reqCaps: roles: Viewer flags: apple-internal doc-type icon: bindings: public.folder, com.apple.application-bundle, com.apple.package --------------------------------------------------------
-------------------------------------------------------- type id: 12028 uti: public.folder description: folder flags: exported active core apple-internal trusted icon: Contents/Resources/GenericFolderIcon.icns conforms to: public.directory tags: 'fold', 'fldr' --------------------------------------------------------
-------------------------------------------------------- claim id: 42468 name: Folder rank: None reqCaps: roles: Viewer flags: doc-type icon: bindings: public.folder, com.apple.application-bundle, com.apple.package --------------------------------------------------------------------------------
I assumes that the bolded one is the one which is supposed to be used.
Most applications's plist files contain the keys : UTExportedTypeDeclarations and UTImportedTypeDeclarations
If I understood well, the first time we run the applications, the system add the ExportedTypeDeclarations to it's database
Yvan KOENIG (VALLAURIS, France) mardi 13 octobre 2015 14:48:06
|