Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8079709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:11:43+00:00 2026-06-05T16:11:43+00:00

I have many different NSArray ‘s stored in .dat files, in the Documents folder

  • 0

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 countfor 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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T16:11:44+00:00Added an answer on June 5, 2026 at 4:11 pm

    If you’re happy to change the format of your .dat file you could compute a hash of each array’s contents and store that at the beginning of the file. When you get new data you can compute its hash and compare that with the hash stored in your file.

    Your choice of hashing function will determine the computational efficiency, but the I/O would be minimized.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a folder that contains many different files: folder1: somthing.php somthingelse.php blah.php ect
I have many different csv files that I would like to convert in to
I have an application with many different parts, it runs on OSGi, so there's
I have many layers in the Documents that will be displayed on different user
I'm creating a Facebook-like social-network website. For my wall, I have many different kind
The problem is we have many different error messages being produced and stored in
I have many resource files, in many different languages. Lets suppose for example we
I have many, (15-20) different XML files that I need to load to VB.Net.
I have many different classes under /lib/ folder with many actions. Before saving an
In my application I have many different JSP forms with multiple stages, that is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.