June 2011
Intermediate to advanced
590 pages
19h 31m
English
In addition to archiving and NSData’s binary read and write methods, there are a few more methods for transferring data to and from the filesystem. One of them, Core Data, is coming up in Chapter 17. A couple of the others are worth mentioning here.
You have access to the standard file I/O functions from the C library. These functions look like this:
FILE *inFile = fopen("textfile", "rt"); char *buffer = malloc(someSize); fread(buffer, byteCount, 1, inFile); FILE *outFile = fopen("binaryfile", "w"); fwrite(buffer, byteCount, ...
Read now
Unlock full access