Alan Kleymeyer’s Blog
What is up.
-
Archives in Cocoa
Posted on September 21st, 2007 No commentsIf 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
You must be logged in to post a comment.


