<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Obj-C download destination + two questions on method names in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Obj-C-download-destination-two-questions-on-method-names/m-p/191410#M8364</link>
    <description>&lt;P&gt;Hello again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Three quick questions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. To download a file, I use -downloadUrl:overwrite:destination:.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The documentation for the latter says:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"A closure used to compute the destination, given the temporary file location and the response."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What exactly does this mean in practice? More specifically: you set a destination URL using the destination parameter, telling the SDK where you want the file downloaded. Then, the response callback provides the final URL. i.e.:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;NSURL *destinationURL = @"/user/username/documents/file.txt";
        DBDownloadUrlTask *downloadTask = [self.dropboxClient.filesRoutes downloadUrl:@"/my/file.txt" overwrite:YES destination:destinationURL];
        [downloadTask response:^(DBFILESMetadata *metaData, DBFILESDownloadError *downloadError, DBError *dbError, NSURL *downloadURL){
            
        }];&lt;/PRE&gt;&lt;P&gt;So, my question is: in the above snippet, is downloadURL guaranteed to be the same as destinationURL because I set overwrite to YES? I'm assuming (and hoping) that the final file URL of the downloaded file&amp;nbsp;on disk (downloadURL in the above example) will only ever differ from the destination URL passed into -downloadUrl:... (destinationURL in the above example) if overwrite is set to NO. Is that assumption correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then two unimportant questions sprung purely from my curiosity on certain method names:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. What is the significance of the underscore at the end of&amp;nbsp;DBFILESRoutes's "delete" method? That is, why is it "delete_:" instead of "delete:"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. What is the significance of the "d" prefix of all the copy methods - "dcopy" instead of "copy"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Keith&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:29:05 GMT</pubDate>
    <dc:creator>Keith B.7</dc:creator>
    <dc:date>2019-05-29T09:29:05Z</dc:date>
    <item>
      <title>Obj-C download destination + two questions on method names</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Obj-C-download-destination-two-questions-on-method-names/m-p/191410#M8364</link>
      <description>&lt;P&gt;Hello again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Three quick questions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. To download a file, I use -downloadUrl:overwrite:destination:.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The documentation for the latter says:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"A closure used to compute the destination, given the temporary file location and the response."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What exactly does this mean in practice? More specifically: you set a destination URL using the destination parameter, telling the SDK where you want the file downloaded. Then, the response callback provides the final URL. i.e.:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;NSURL *destinationURL = @"/user/username/documents/file.txt";
        DBDownloadUrlTask *downloadTask = [self.dropboxClient.filesRoutes downloadUrl:@"/my/file.txt" overwrite:YES destination:destinationURL];
        [downloadTask response:^(DBFILESMetadata *metaData, DBFILESDownloadError *downloadError, DBError *dbError, NSURL *downloadURL){
            
        }];&lt;/PRE&gt;&lt;P&gt;So, my question is: in the above snippet, is downloadURL guaranteed to be the same as destinationURL because I set overwrite to YES? I'm assuming (and hoping) that the final file URL of the downloaded file&amp;nbsp;on disk (downloadURL in the above example) will only ever differ from the destination URL passed into -downloadUrl:... (destinationURL in the above example) if overwrite is set to NO. Is that assumption correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then two unimportant questions sprung purely from my curiosity on certain method names:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. What is the significance of the underscore at the end of&amp;nbsp;DBFILESRoutes's "delete" method? That is, why is it "delete_:" instead of "delete:"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. What is the significance of the "d" prefix of all the copy methods - "dcopy" instead of "copy"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Keith&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:29:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Obj-C-download-destination-two-questions-on-method-names/m-p/191410#M8364</guid>
      <dc:creator>Keith B.7</dc:creator>
      <dc:date>2019-05-29T09:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Obj-C download destination + two questions on method names</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Obj-C-download-destination-two-questions-on-method-names/m-p/191446#M8374</link>
      <description>&lt;P&gt;1. That's correct, since overwrite is NO, destinationURL will be the same as&amp;nbsp;downloadURL. (The documentation is a little misleading due to an old reference to "closure". We'll get that fixed up.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. and 3. These methods have these modifications to avoid some&amp;nbsp;reserved keyword/prefix constraints in Objective-C/Cocoa. It's non-ideal of course, but there's nothing special you need to do on your side beyond use those inconsistent names.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 19:05:15 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Obj-C-download-destination-two-questions-on-method-names/m-p/191446#M8374</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-10-20T19:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Obj-C download destination + two questions on method names</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Obj-C-download-destination-two-questions-on-method-names/m-p/191447#M8375</link>
      <description>&lt;P&gt;Great, thanks again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All the best,&lt;BR /&gt;Keith&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 19:06:34 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Obj-C-download-destination-two-questions-on-method-names/m-p/191447#M8375</guid>
      <dc:creator>Keith B.7</dc:creator>
      <dc:date>2016-10-20T19:06:34Z</dc:date>
    </item>
  </channel>
</rss>

