Kevin Muldoon wrote:

Well, as I indicated, it's only a bit of icing on the cake. I'm just a bit shocked such an trivial task in a scripting language requires such heavy lifting in Obj-C (or more accurately, C).


The Finder's "spotlight comment" is stored as an xattr attached to the file.

To test: make a file, add a comment to it in Finder's Get Info window, then in Terminal:

xattr -l /path/to/commentedFile

The xattr name is com.apple.metadata:kMDItemFinderComment. The contents is a bplist (binary plist) containing the comment data. Maybe google the xattr name for more info. Also see the output of 'xattr -h' (xattr cmd's builtin help summary).

There are C functions for working with xattrs, which I've found were quite easy to use. See 'man getxattr' and then check the other xattr functions listed under SEE ALSO. Also check the output of: 'apropos xattr'.

  -- GG

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to