I have many different NSArray
's stored in .dat
files, in the Documents
folder of my iPhone application, like so:
john.dat
mary.dat
bob.dat etc...
The number of .dat
files is unknown and it will increase or decrease according to a number of factors related to the user's manipulation of the app.
What are the contents of these NSArray's
stored in the.dat
files? They contain NSString's
. It is important to say that the count
for each NSArray my vary, like so:
john.dat Contains this array of strings:
"Mon, 11 Jun 2012 04:52:06 GMT",
"Tue, 12 Jun 2012 04:51:59 GMT",
"Wed, 13 Jun 2012 04:52:30 GMT",
"Thu, 07 Jun 2012 04:52:00 GMT",
mary.dat Contains this array of strings:
"Mon, 11 Jun 2012 04:52:06 GMT",
"Tue, 12 Jun 2012 04:51:59 GMT",
bob.dat Contains this array of strings:
"Mon, 11 Jun 2012 04:52:06 GMT",
"Tue, 12 Jun 2012 04:51:59 GMT",
"Wed, 13 Jun 2012 04:52:30 GMT",
"Thu, 07 Jun 2012 04:52:00 GMT",
"Fri, 08 Jun 2012 04:51:59 GMT",
"Sun, 10 Jun 2012 04:50:55 GMT"
etc..
I have to periodically verify if each NSString
of these NSArray's
has been modified, to notify the user of certain events. After doing a XML parsing from the Internet I'm already able to have in memory the new NSArray's
corresponding to its respective .dat
file previously stored in the Documents
folder.
Since I have many .dat
files, my question is:
How do I compare EFFICIENTLY AND AT ONCE the new NSArray's
(NSArray *john, *mary, *bob
, etc...) that I have in memory (as a result of this XML parsing), with the old ones stored in its corresponding john.dat, mary.dat, bob.dat
, etc... files in the Documents
folder and notify the user if any of the NSString's
("Mon, 11 Jun 2012 04:52:06 GMT","Tue, 12 Jun 2012 04:51:59 GMT",
etc...) has been modified?
Thanks for your help!