I have a sample iOS app in which I am trying to measure the time taken by the various file writing alternatives. While measuring the time, I noticed that NSString's writeToFile method write to the file even when I have a file handle for read on the same file that has been obtained by using fopen().
Well, that's easy. writeToFile creates a new file with the same name. Your file handle refers to the old file. The old file will disappear when you close the file handle; it's name already disappeared when writeToFile created a new file.