Re: ditto in ObjC or C
Re: ditto in ObjC or C
- Subject: Re: ditto in ObjC or C
- From: Finlay Dobbie <email@hidden>
- Date: Tue, 3 May 2005 16:21:45 +0100
On 5/3/05, Rémy Schumm <email@hidden> wrote:
> Hi List
>
> 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?
Since this is the Cocoa list, I'll point out that NSFileManager has
kept the resource fork intact since 10.2 (IIRC).
If you're doing it from a Java application, you can use the
FSCopyObject sample code via JNI (I believe this functionality is
exposed by the File Manager API in Carbon on Tiger, too), or use the
NSFileManager from the Java Bridge.
Launching another task to do your bidding seems like an unclean approach to me.
-- Finlay
_______________________________________________
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