title: Error in iOS: "you don't have permission"
body: <p>I'm working on an iOS project in Swift which uses the Dropbox API to upload text files to Dropbox as well as load and read them from Dropbox. However, when I try to load a file using my <code>DBRestClient</code> using the following line:</p>
  
  <pre><code>restClient.loadFile("/data/" + yearStr + "/" + yearMonthStr + "/" + fullStr + ".txt", atRev: nil, intoPath: "temp2.txt")
  </code></pre>
  
  <p>I see the following error message in the console:</p>
  
  <blockquote>
    <p>DropboxSDK: error making request to /1/files/sandbox/data/15/15_12/15_12_10.txt - (404) Path is a directory`</p>
  </blockquote>
  
  <p>I'm not really sure what this means, since neither path involved in the call looks like a directory to me. I've searched for this error message but I can't seem to find it anywhere online, and I'm not sure what else might have caused it since commenting out this line prevents the error fro showing up and the same filepath works fine in other calls that don't involve loading files. Am I missing something about how <code>loadFile()</code> works?</p>
  
  <p>UPDATE: I fixed the previous error by deleting a directory with the that filepath, making it choose the correct file. However, I am now getting the following error instead:</p>
  
  <p><code>DropboxSDK: error making request to /1/files/sandbox/data/15/15_12/15_12_10.txt - (513) Error Domain=NSCocoaErrorDomain Code=513 "The file couldn’t be saved because you don’t have permission." UserInfo={path=/data/15/15_12/15_12_10.txt, destinationPath=temp2.txt}</code></p>
  
  <p>I'm not sure what it means-- do I not have permission for the destination on my phone, or for the file on dropbox? I'm looking up this error message but I'm not finding anything yet, so help would be much appreciated.</p>