Referencing file on disk from NSManagedObject

Posted by Kamchatka on Stack Overflow See other posts from Stack Overflow or by Kamchatka
Published on 2010-05-09T05:40:13Z Indexed on 2010/05/09 5:48 UTC
Read the original article Hit count: 244

Filed under:
|
|
|

Hello,

What would be the best way to name a file associated to a NSManagedObject. The NSManagedObject will hold the URL to this file.

But I need to create a unique filename for my file. Is there some kind of autoincrement id that I could use? Should I use mktemp (but it's not a temporary file) or try to convert the NSManagedObjectId to a filename? but I fear there will be special characters which might cause problem.

What would you suggest?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about coredata