title: Dropbox API, renaming and unique IDs
body: <p>I know this has been touched upon in <a href="https://stackoverflow.com/questions/15209512/dropbox-file-unique-identifier-restful-api">this post</a>, but I was hoping for some additional clarification about this.</p>
  
  <p>Currently, with the <a href="https://www.dropbox.com/developers/core/api" rel="nofollow noreferrer">Dropbox Core API</a>, there doesn't seem to be a way to track files that have been renamed.  For example, if you're using the API to sync a Dropbox app_folder with a local application directory.  You rename the file on the Dropbox side and then call <a href="https://www.dropbox.com/developers/core/api#delta" rel="nofollow noreferrer"><code>delta</code></a> to see how you should update your local application directory, you're returned two entries...</p>
  
  <pre><code>array(
      0 =&gt; '/somefile.txt',
      1 =&gt; null
  ),
  array(
      0 =&gt; '/somefile-renamed.txt',
      1 =&gt; array(
          'revision' =&gt; 343
          'rev' =&gt; 'd90se4c661'
          'thumb_exists' =&gt; false
          'bytes' =&gt; 1263
          'modified' =&gt; 'Tue, 09 Apr 2013 19:06:39 +0000'
          'client_mtime' =&gt; 'Tue, 09 Apr 2013 18:43:06 +0000'
          'path' =&gt; string '/somefile-renamed.txt'
          'is_dir' =&gt; false
          'icon' =&gt; 'page_white_text'
          'root' =&gt; 'app_folder'
          'mime_type' =&gt; 'application/octet-stream'
          'size' =&gt; '1.2 KB'
      )
  )
  </code></pre>
  
  <p>For each array returned, the first element is the file that requires an update and the second element is the file metadata info.  If the second element is <code>null</code>, you should delete your local version (and anything under it, if it's a directory) of that file.</p>
  
  <p>So, in the above example, it's telling you to delete the first file and upload this completely new file.  Unfortunately, there's no way to track that this new file that you have been told to create was actually just the renamed version of the file you're being told to delete.  From your application's perspective (the non-Dropbox side), it just looks like a strait delete and a new file coming in.</p>
  
  <p>This can be problematic if you're storing the data in these files elsewhere (like in a database) and you need to update the record instead of creating a new record and deleting the old one.</p>
  
  <p>Is there some accepted way to track file association after a rename?  I can't seem to find a way to do it using metadata, delta or revisions.</p>