Saving a "project"-type document (containing sub-documents)

Posted by andyvn22 on Stack Overflow See other posts from Stack Overflow or by andyvn22
Published on 2010-03-08T00:57:16Z Indexed on 2010/03/08 1:01 UTC
Read the original article Hit count: 348

Filed under:
|
|
|

I'm trying to create a "project"-like document, in that it contains subdocuments in a specified directory. I'd like a brand new save of a document to set up that directory with appropriate subdirectories. I'd like a "Save As" to copy all those subdirectories and any files within them to the new location. But I'd like a "Save" to only update certain data files and (of course) not overwrite all the subdocuments!

What's the "safe" way to do this? I tried keeping track of the file's location in my document, and checking to see if it was the same or different than the save location, but it feels messy, and I'm worried that Apple is doing something behind the scenes that will make this direct URL-to-URL comparison fail in some circumstances.

Is there a standard way to do something like this?

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about objective-c