I am trying to write to the iPhone app's cache folder with images downloaded from a server. My plan is to save the images in "site.com/path/to/image.jpg", since mirroring the server folder structure like that makes duplicate names impossible, and it just seems the right way to do it. Unfortunately, it seems I have to create the folders myself before writing the file. Is there a method in Objective-C to call which, if given "/Users/Me/a/b/c" (no, that's not a valid iPhone path, just an example) will realize /Users/Me exists, and then create a, then under a create b, and so on until it gets to the end?
I could write it myself, but I like to use built-in functions as much as possible. I couldn't find anything about this here.