Archives in CocoaPosted on September 21st, 2007 No comments
If you need to save and load data from files, and you don’t mind creating binary files (don’t need to read or edit them), then Archives are the simplest way to go.
Load contents of file into an NSArray:
NSArray* m_ProcessedFiles = [NSKeyedUnarchiver unarchiveObjectWithFile:destPath];
Save contents of array to file:
[NSKeyedArchiver archiveRootObject:m_ProcessedFiles toFile:srcPath];
Leave a reply