I am trying to get the path that an NSDocument is being saved to at save time. I tried overriding writeToURL
but that would pass me an obscure temp file URL, which was not where it was getting saved. Also asking the document like this [document fileURL]
only works after it has been saved. I can get the path when it is loaded but I need some way for that initial save. Is there a way I can get the real file path when an NSDocument is saved?
It would really help if you told us more about why you want this.
That said, the lowest level method with this information is -writeSafelyToURL:ofType:forSaveOperation:error: