I checked Iphone SDK Documentation, find NSFileHandle object, it said "with NSFileHandle, you can range over an open file and insert, extract, and delete data." but I could only find the way to replace the exist data by using "seekToFileOffset:" and "writeData:" method. how to delete a range of data and insert a range of data in a file?
Asked
Active
Viewed 311 times
2
-
If you have to ask this question, you probably don't want this solution. I suggest you use a common file format like XML or a plist or something. If your data-set is too large to read and write atomically, use a well-established binary interface like Core Data or sqlite. – Jason Coco Aug 19 '11 at 08:32
-
the data is Binary, and it is large to read,so xml and plist may not be a good choice. But use Core Data is a complex for the program – dami Aug 22 '11 at 01:27