• 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: Getting/Setting FinderInfo attributes using native Cocoa API?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting/Setting FinderInfo attributes using native Cocoa API?


  • Subject: Re: Getting/Setting FinderInfo attributes using native Cocoa API?
  • From: Stephane Sudre <email@hidden>
  • Date: Sat, 15 Oct 2016 16:42:07 +0200

Actually, it's to put back some of them on a newly created folder. So
right now, it just retrieves the values as NSData objects but I've
added a hook to be able to convert the data to the real objects.

the - [NSFileManager copyItemAtPath:toPath:error:] API does copy at
least the FinderInfo and ResourceFork extended attributes (which are
the ones that I need). I haven't checked whether it was copying the
quarantine flag or the download history ones yet. So depending on your
needs, you may not need to use the copyfile API.


On Sat, Oct 15, 2016 at 9:20 AM, Allan Odgaard
<email@hidden> wrote:
> On 14 Oct 2016, at 23:33, Stephane Sudre wrote:
>
>> I ended up writing a category for NSManager to deal with this using
>> the xattr.h APIs. […]
>
>
> If the goal is to copy extended attributes (as one post alluded to) then
> there is the `COPYFILE_METADATA` flag which can be used with
> x-man-page://3/copyfile
>
> Although I seem to recall some crash issues when used with network drives,
> my code skips it for non-local drives with a reference to <rdar://17480649>
> but that report seems to have been marked “secret” so I can no longer read
> it…
> _______________________________________________
>
> 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



--
Packaging Resources - http://s.sudre.free.fr/Packaging.html

_______________________________________________

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


References: 
 >Getting/Setting FinderInfo attributes using native Cocoa API? (From: Stephane Sudre <email@hidden>)
 >Re: Getting/Setting FinderInfo attributes using native Cocoa API? (From: "Gary L. Wade" <email@hidden>)
 >Re: Getting/Setting FinderInfo attributes using native Cocoa API? (From: Stephane Sudre <email@hidden>)
 >Re: Getting/Setting FinderInfo attributes using native Cocoa API? (From: "Gary L. Wade" <email@hidden>)
 >Re: Getting/Setting FinderInfo attributes using native Cocoa API? (From: Stephane Sudre <email@hidden>)
 >Re: Getting/Setting FinderInfo attributes using native Cocoa API? (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Re: NSTextView tab stop count
  • Next by Date: Optimization Level
  • Previous by thread: Re: Getting/Setting FinderInfo attributes using native Cocoa API?
  • Next by thread: NSTextView tab stop count
  • Index(es):
    • Date
    • Thread