I know that I can get a POSIX int file handle from NSURL by first using fh = [NSFileHandle fileHandleForReadingFromURL:url error:NULL] and then calling [fh fileDescriptor]. However, I need to pass a FILE * to some C library. How can I convert from the int file handle to a proper FILE struct?
I know that I can get a POSIX int file handle from NSURL by
Share
I haven’t tried this but how about using fdopen() from the standard C library to produce a FILE * from a descriptor?