• 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: Can I get a FILE* from Cocoa (NSFileHandle )?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Can I get a FILE* from Cocoa (NSFileHandle )? (From: Paul Archibald <email@hidden>)
 >Re: Can I get a FILE* from Cocoa (NSFileHandle )? (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: understanding conversions between CF and NS datatypes
  • Next by Date: Re: understanding conversions between CF and NS datatypes
  • Previous by thread: Re: Can I get a FILE* from Cocoa (NSFileHandle )?
  • Next by thread: Re: Can I get a FILE* from Cocoa (NSFileHandle )?
  • Index(es):
    • Date
    • Thread