• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Folder Type Identifier
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Folder Type Identifier


  • Subject: Re: Folder Type Identifier
  • From: Yvan KOENIG <email@hidden>
  • Date: Tue, 13 Oct 2015 14:48:45 +0200


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


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Shell script to get a list of all subfolders inside a folder (From: Bert Groeneveld <email@hidden>)
 >Re: Folder Type Identifier (From: Shane Stanley <email@hidden>)
 >Re: Folder Type Identifier (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Shell script to get a list of all subfolders inside a folder
  • Next by Date: Re: Shell script to get a list of all subfolders inside a folder
  • Previous by thread: Re: Folder Type Identifier
  • Next by thread: Re: Folder Type Identifier
  • Index(es):
    • Date
    • Thread