title: Using Delta in Dropbox API with iOS
body: <p>I'm using the dropbox api for iOS and have been messing with the loadDelta function.  I get the whole "key" that is sent, and I get how the structure is set up (see below this code), but what I don't understand is how to download the file that is sent and how to save it to the iOS device.  Does anyone have any insight on how to do this?</p>
  
  <pre><code>-(void)restClient:(DBRestClient *)client loadedDeltaEntries:(NSArray *)entries reset:(BOOL)shouldReset cursor:(NSString *)cursor hasMore:(BOOL)hasMore{
      for (DBDeltaEntry *file in entries) {
           if(!file.metadata.isDirectory){
               NSLog(@"File: %@ ", file.metadata.filename );
           }else {
               NSLog(@"Directory: %@  ", file.metadata.filename );
           }
       }
  }
  </code></pre>
  
  <p>The call sends back an array called entries. Each entry in entries is this:</p>
  
  <pre><code>    @interface DBDeltaEntry : NSObject {
          NSString *lowercasePath;
          DBMetadata *metadata;
      }
  </code></pre>
  
  <p>with the DBMetadata object being: </p>
  
  <pre><code>@interface DBMetadata : NSObject &lt;NSCoding&gt; {
      BOOL thumbnailExists;
      long long totalBytes;
      NSDate* lastModifiedDate;
      NSDate *clientMtime; // file's mtime for display purposes only
      NSString* path;
      BOOL isDirectory;
      NSArray* contents;
      NSString* hash;
      NSString* humanReadableSize;
      NSString* root;
      NSString* icon;
      NSString* rev;
      long long revision; // Deprecated; will be removed in version 2. Use rev whenever possible
      BOOL isDeleted;
  
      NSString *filename;
  }
  </code></pre>
  
  <p>What I can't figure out is how to recursively set up my offline structure or the best practice for doing so.  My assumption is though, using delta, I won't need to keep a database of the files I have saved for update purposes, right?</p>