how to create folder structure in documents folder of my iPhone app -


I have a folder structure in my server and I have to navigate to the device side through that folder. I get folder structure in XML format. I have my query: - 1) Can I create the same folder structure in the document folder of my iPhone app?

2) Creating folders in device document folder or just reading XML will be the best and show the folder as we parse it (I mean no folder creation).

Waiting for your answer

I will confirm 100% of your question I'm not, but I think this is what you are after ...

First of all, you have to parse the XML from your server. You can do this in the NSXMLParser or with different XML-Parser and Document handler. After that, you can create a directory on your iPhone applications using the following document folder:

  • . I assume that you have a directory named directory with the name of an NSSrray name.

      NSArray * paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, yes); NSString * documentPath = [Path ObjectAddIndexX: 0]; (Directory in NSString * directory) {NSString * directoryPath = [Storage Path Stringbapping Path Company: Directory]; [[NSFileManager default manager] createDirectoryAtPath: directoryPath attributes: zero]; }  

    This code is absolutely simple and does not include support for adding entire folder structure (first level). But you get this idea.


    Comments