• 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: ditto in ObjC or C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ditto in ObjC or C


  • Subject: Re: ditto in ObjC or C
  • From: Nathan Day <email@hidden>
  • Date: Tue, 03 May 2005 18:16:05 +1000

If you look in 'File Manager Reference' you will see that there are funtion for reading and writting forks as a series of bytes. You could write your own copy function.

In Tuesday, May 03, 2005, at 06:08PM, Graham J Lee <email@hidden> wrote:

>On 3 May 2005, at 08:49, Jens Miltner wrote:
>
>> Am 03.05.2005 um 09:05 schrieb Rémy Schumm:
>>
>>> I'm copying a File with java - of course, the resource fork gets lost
>>> (e.g. the thumbnail-image on a Photoshop-File).
>>> The "ditto" command-line-tool does exactly what I want: ditto --rsrc
>>> copies with resource.
>>>
>>> Question: is there some ObjC or C function somewhere that I could use
>>> for this, e.g. access via JNI?
>>
>> You could use e.g. NSTask to run ditto as an external tool.
>> Alternatively, take a look at
>> <http://developer.apple.com/samplecode/FSCopyObject/
>> FSCopyObject.html>. This is some C code that implements HFS+ savvy
>> object copying. Not sure how easy this is to integrate with java,
>> though...
>>
>
>In an off-list discussion with Rémy I suggested looking at the source
>code for cp from Darwin 8.0 as it understands resource forks -
>mentioned on-list as well as it's relevant :-)
>--
>Graham Lee                       GPG Key ID: 01D5B9D8
>UNIX Systems Manager, Oxford Physics Practical Course
>Coordinator, UKUUG Apple SIG (email@hidden)
>Technical bod, Oxford Mac Users' Group (http://www.oxmug.org)
>
> _______________________________________________
>Do not post admin requests to the list. They will be ignored.
>Cocoa-dev mailing list      (email@hidden)
>Help/Unsubscribe/Update your Subscription:
>
>This email sent to email@hidden
>
>


Nathan Day
email@hidden
http://homepage.mac.com/nathan_day/
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >ditto in ObjC or C (From: Rémy Schumm <email@hidden>)
 >Re: ditto in ObjC or C (From: Jens Miltner <email@hidden>)
 >Re: ditto in ObjC or C (From: Graham J Lee <email@hidden>)

  • Prev by Date: Re: ditto in ObjC or C
  • Next by Date: Clarification: Detecting the Option key on selecting a menuitem
  • Previous by thread: Re: ditto in ObjC or C
  • Next by thread: Re: ditto in ObjC or C
  • Index(es):
    • Date
    • Thread