• 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
copyfile missing spotlight comments?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

copyfile missing spotlight comments?


  • Subject: copyfile missing spotlight comments?
  • From: John McLaughlin <email@hidden>
  • Date: Thu, 25 Jun 2009 13:02:08 -0700

Hi All,
I've got a need to get all of the Attributes of a file (including EA's) --
At wwdc I talked with some of the filesystems guys and they (very helpfully)
pointed me at a few ideas including copyfile (
http://developer.apple.com/documentation/Darwin/Reference/Manpages/man3/copyfile.3.html
)

What I can do is a copyfile with the flags COPYFILE_METADATA | COPYFILE_PACK
| COPYFILE_VERBOSE and it does a great job of picking up what appears to be
all of the various attributes -- The exact call I use is

copyfile(ifname, ofname, 0,   COPYFILE_METADATA | COPYFILE_PACK |
COPYFILE_VERBOSE);


 If I then try to unpack if using the 'reverse' command it almost works perf
ectly:


 copyfile(ofname, ifname, 0,  COPYFILE_UNPACK | COPYFILE_VERBOSE |
COPYFILE_METADATA);


Permissions, responsible app, 'finder color', all seem to unpack and get
applied to the file properly (even third party EA's seem to work properly)
-- The one thing that doesn't seem to survive is spotlight comments.


If I look in the packed file (ofname in this case) I can see the finder
comments there so I know they are being serialized properly but it doesn't
seem to transfer them when I unpack the file.


Is this expected behaviour or am I missing something?


-John
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Prev by Date: Re: IBPlugin embedding question
  • Next by Date: Re: Programmatically Picking Elements
  • Previous by thread: Re: NSOutlineView selection disable
  • Next by thread: Number of images in main bundle folder (iPhone)
  • Index(es):
    • Date
    • Thread