Strategy to keep track of stored files in the documents directory?

Posted by mystify on Stack Overflow See other posts from Stack Overflow or by mystify
Published on 2010-03-16T11:57:35Z Indexed on 2010/03/16 12:16 UTC
Read the original article Hit count: 265

Filed under:
|
|

In my app, the user can save his input to disk. This is done with NSKeyedArchiver. Currently I simply name my files with a timestamp. But of course, the user may want to load one of them back in to keep on editing them.

What would be the most reliable / safe strategy to keep track of those files? I need to present the user a list of those files, so that he can choose one to open.

Currently I think of making an archived NSMutableArray which simply stores the file names, but I feel that this strategy is not really good. We all know when we save files sometimes something goes wrong, and this seems very likely to get currupted easily, or not? How would you do it?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about cocoa-touch