Re: Can I get a FILE* from Cocoa (NSFileHandle )?
Re: Can I get a FILE* from Cocoa (NSFileHandle )?
- Subject: Re: Can I get a FILE* from Cocoa (NSFileHandle )?
- From: Paul Archibald <email@hidden>
- Date: Thu, 4 Sep 2008 11:18:56 -0700
Naturally as soon as I posted my query I noticed that there was a
method I had not paid any attention to, and, of course, that is the
one Jean-Daniel and Robert already knew about, and have been kind
enough to point out to me. Thanks guys, I will be testing this out next.
Regards,
Paul
On Sep 4, 2008, at 10:18 AM, Jean-Daniel Dupas wrote:
Le 4 sept. 08 à 19:09, Paul Archibald a écrit :
I have gotten some suggestions on a problem which require access
to standard C calls. In particular, one poster suggested that I
use some calls which require a FILE*, when all I have at this
point are NSTask, NSPipe, and NSFileHandle objects.
Is it possible to get a FILE* from an NSPipe or NSFileHandle? I
don't see anything in the documentation that looks like that. (I
am not getting much help from Google either.)
fdopen[[fileHandle fileDescriptor], ...)
See man fdopen for details.
Get a fileDescriptor from your NSFileHandle object, then fdopen it
to get a FILE*.
_______________________________________________
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