title: iPhone DropBox API: How to load a file?
body: <p>A very basic question concerning dropBox integration into an iPhone app.</p>
  
  <p>I followed the setup of the DropBoxSDK and everything works fine. I can log on to my account and get it linked. So I set up everything correctly.</p>
  
  <p>Now I would like to use it to simply load a file from the dropBox and save it again. Consider that you only want to sync ONE FILE (for the sake of simplicity), called 'example.txt' which is located in the 'Example' folder in my DropBox. The same 'example.txt' is saved locally on the iPhone in the Documents directory of my app.</p>
  
  <p>The dropBox readme file suggest vaguely the following code which I find highly cryptic and can't really see how to load or save a file:</p>
  
  <pre><code>2. Make an request on the rest client:
  
     [[self restClient] loadMetadata:@"/"];
  
  3. Implement the DBRestClientDelegate methods needed to get the results of the
     particular call you made:
  
     - (void)restClient:(DBRestClient*)client 
         loadedMetadata:(DBMetadata*)metadata {
  
         NSLog(@"Loaded metadata!");
     }
  
     - (void)restClient:(DBRestClient*)client 
         metadataUnchangedAtPath:(NSString*)path {
  
         NSLog(@"Metadata unchanged!");
     }
  
     - (void)restClient:(DBRestClient*)client 
         loadMetadataFailedWithError:(NSError*)error {
  
         NSLog(@"Error loading metadata: %@", error);
     }
  </code></pre>
  
  <p>So my (hopefully) simple question is how I can:</p>
  
  <ul>
  <li>check if there is an example folder in my dropbox</li>
  <li>if not, create one and save the example.txt from app documents into this example folder</li>
  <li>load example.txt</li>
  <li>once programme quits: save example.txt to DropBox</li>
  </ul>
  
  <p>I can't really find an answer to these quite basic steps in the DropBox docs on the website. The example they've provided I find too confusing... especially as it is only about loading files and not saving them as far as I can see.</p>
  
  <p>I'd be grateful for any help or suggestions of how to go about this.</p>