This is great.  Thanks for sharing.  I was working with kMD attributes years 
ago before I knew much about command line.  Was stuck trying to work in 
AppleScript (and at the time didn't really understand what Spotlight or kMDs 
were about), gave up, and never revisited.  Really helpful to re-discover.

Just for clarity: kMD metadata is not contained in the file. It's external 
data, handled by MacOS's Spotlight system, which is why it won't necessarily 
port and can disappear or change when the file is copied or moved to another 
location.

RE "Since my system has no known Uniform Type Identifier associated with the 
htaccess file extension, a dynamic type identifier is used (the dyn domain)" -- 
What's the story there?  Is that something you imposed?  I don't see have no 
kMDItemContentType / kMDItemTypeTree for .htaccess files on my system.

Apparently you can push your own custom types into your system -- thought I'm 
not yet sure to what end.

All very interesting.  Thanks again.

> On Mar 6, 2020, at 9:51 PM, GP <[email protected]> wrote:
> 
> With Terminal or a BBEdit Worksheet run the command mdls  on a file you want 
> to examine the metadata for. For example, a BBEdit newly created and saved  
> Apache Configuration File language type small test file, the command:
> 
> mdls /Users/grp/Documents/BBEdit\ temp/MyTest3.htaccess
> 
> has the output:
> 
> kMDItemContentCreationDate         = 2020-03-07 04:38:59 +0000
> kMDItemContentCreationDate_Ranking = 2020-03-07 00:00:00 +0000
> kMDItemContentModificationDate     = 2020-03-07 04:38:59 +0000
> kMDItemContentType                 = "dyn.ah62d4rv4ge80u7dbqrv0n65x"
> kMDItemContentTypeTree             = (
>     "dyn.ah62d4rv4ge80u7dbqrv0n65x",
>     "public.item",
>     "dyn.ah62d4rv4ge80u7dbqrv0n65x",
>     "public.data"
> )
> kMDItemDateAdded                   = 2020-03-07 04:38:59 +0000
> kMDItemDateAdded_Ranking           = 2020-03-07 00:00:00 +0000
> kMDItemDisplayName                 = "MyTest3.htaccess"
> kMDItemFSContentChangeDate         = 2020-03-07 04:38:59 +0000
> kMDItemFSCreationDate              = 2020-03-07 04:38:59 +0000
> kMDItemFSCreatorCode               = ""
> kMDItemFSFinderFlags               = 0
> kMDItemFSHasCustomIcon             = (null)
> kMDItemFSInvisible                 = 0
> kMDItemFSIsExtensionHidden         = 0
> kMDItemFSIsStationery              = (null)
> kMDItemFSLabel                     = 0
> kMDItemFSName                      = "MyTest3.htaccess"
> kMDItemFSNodeCount                 = (null)
> kMDItemFSOwnerGroupID              = 20
> kMDItemFSOwnerUserID               = 501
> kMDItemFSSize                      = 22
> kMDItemFSTypeCode                  = ""
> kMDItemInterestingDate_Ranking     = 2020-03-07 00:00:00 +0000
> kMDItemKind                        = "Document"
> kMDItemLogicalSize                 = 22
> kMDItemPhysicalSize                = 4096
> 
> Note: that output is on a Mac OS 10.13 system and my not be the same on other 
> system versions.
> 
> The entries kMDItemContentType and kMDItemContentTypeTree uses Apple's 
> Uniform Type Identification system to describe the data type and/or format of 
> the file's content.  Since my system has no known Uniform Type Identifier 
> associated with the htaccess file extension, a dynamic type identifier is 
> used (the dyn domain).

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/4756BB5E-545A-417E-84CD-BC826EF0858A%40gmail.com.

Reply via email to