<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> Class: DropboxApi::Endpoints::Files::Copy — Documentation by YARD 0.9.26 </title> <link rel="stylesheet" href="../../../css/style.css" type="text/css" /> <link rel="stylesheet" href="../../../css/common.css" type="text/css" /> <script type="text/javascript"> pathId = "DropboxApi::Endpoints::Files::Copy"; relpath = '../../../'; </script> <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script> <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script> </head> <body> <div class="nav_wrap"> <iframe id="nav" src="../../../class_list.html?1"></iframe> <div id="resizer"></div> </div> <div id="main" tabindex="-1"> <div id="header"> <div id="menu"> <a href="../../../_index.html">Index (C)</a> » <span class='title'><span class='object_link'><a href="../../../DropboxApi.html" title="DropboxApi (module)">DropboxApi</a></span></span> » <span class='title'><span class='object_link'><a href="../../Endpoints.html" title="DropboxApi::Endpoints (module)">Endpoints</a></span></span> » <span class='title'><span class='object_link'><a href="../Files.html" title="DropboxApi::Endpoints::Files (module)">Files</a></span></span> » <span class="title">Copy</span> </div> <div id="search"> <a class="full_list_link" id="class_list_link" href="../../../class_list.html"> <svg width="24" height="24"> <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect> <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect> <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect> </svg> </a> </div> <div class="clear"></div> </div> <div id="content"><h1>Class: DropboxApi::Endpoints::Files::Copy </h1> <div class="box_info"> <dl> <dt>Inherits:</dt> <dd> <span class="inheritName"><span class='object_link'><a href="../Rpc.html" title="DropboxApi::Endpoints::Rpc (class)">Rpc</a></span></span> <ul class="fullTree"> <li>Object</li> <li class="next"><span class='object_link'><a href="../Base.html" title="DropboxApi::Endpoints::Base (class)">Base</a></span></li> <li class="next"><span class='object_link'><a href="../Rpc.html" title="DropboxApi::Endpoints::Rpc (class)">Rpc</a></span></li> <li class="next">DropboxApi::Endpoints::Files::Copy</li> </ul> <a href="#" class="inheritanceTree">show all</a> </dd> </dl> <dl> <dt>Defined in:</dt> <dd>lib/dropbox_api/endpoints/files/copy.rb</dd> </dl> </div> <h2> Constant Summary <small><a href="#" class="constants_summary_toggle">collapse</a></small> </h2> <dl class="constants"> <dt id="Method-constant" class="">Method = </dt> <dd><pre class="code"><span class='symbol'>:post</span></pre></dd> <dt id="Path-constant" class="">Path = </dt> <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/2/files/copy</span><span class='tstring_end'>'</span></span></pre></dd> <dt id="ResultType-constant" class="">ResultType = </dt> <dd><pre class="code"><span class='const'><span class='object_link'><a href="../../../DropboxApi.html" title="DropboxApi (module)">DropboxApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Metadata.html" title="DropboxApi::Metadata (module)">Metadata</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Metadata/Resource.html" title="DropboxApi::Metadata::Resource (class)">Resource</a></span></span></pre></dd> <dt id="ErrorType-constant" class="">ErrorType = </dt> <dd><pre class="code"><span class='const'><span class='object_link'><a href="../../../DropboxApi.html" title="DropboxApi (module)">DropboxApi</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Errors.html" title="DropboxApi::Errors (module)">Errors</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Errors/RelocationError.html" title="DropboxApi::Errors::RelocationError (class)">RelocationError</a></span></span></pre></dd> </dl> <h2> Instance Method Summary <small><a href="#" class="summary_toggle">collapse</a></small> </h2> <ul class="summary"> <li class="public "> <span class="summary_signature"> <a href="#copy-instance_method" title="#copy (instance method)">#<strong>copy</strong>(from, to) ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'><p>Copy a file or folder to a different location in the user's Dropbox.</p> </div></span> </li> </ul> <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Rpc.html" title="DropboxApi::Endpoints::Rpc (class)">Rpc</a></span></h3> <p class="inherited"><span class='object_link'><a href="../Rpc.html#build_request-instance_method" title="DropboxApi::Endpoints::Rpc#build_request (method)">#build_request</a></span>, <span class='object_link'><a href="../Rpc.html#initialize-instance_method" title="DropboxApi::Endpoints::Rpc#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="../Rpc.html#request_body-instance_method" title="DropboxApi::Endpoints::Rpc#request_body (method)">#request_body</a></span></p> <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Base.html" title="DropboxApi::Endpoints::Base (class)">Base</a></span></h3> <p class="inherited"><span class='object_link'><a href="../Base.html#add_endpoint-class_method" title="DropboxApi::Endpoints::Base.add_endpoint (method)">add_endpoint</a></span></p> <div id="constructor_details" class="method_details_list"> <h2>Constructor Details</h2> <p class="notice">This class inherits a constructor from <span class='object_link'><a href="../Rpc.html#initialize-instance_method" title="DropboxApi::Endpoints::Rpc#initialize (method)">DropboxApi::Endpoints::Rpc</a></span></p> </div> <div id="instance_method_details" class="method_details_list"> <h2>Instance Method Details</h2> <div class="method_details first"> <h3 class="signature first" id="copy-instance_method"> #<strong>copy</strong>(from, to) ⇒ <tt>Object</tt> </h3><div class="docstring"> <div class="discussion"> <p>Copy a file or folder to a different location in the user's Dropbox. If the source path is a folder all its contents will be copied.</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>from</span> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'><p>Path in the user's Dropbox to be copied or moved.</p> </div> </li> <li> <span class='name'>to</span> <span class='type'>(<tt>String</tt>)</span> — <div class='inline'><p>Path in the user's Dropbox that is the destination.</p> </div> </li> </ul> <p class="tag_title">Returns:</p> <ul class="return"> <li> <span class='type'></span> <div class='inline'><p>The moved file.</p> </div> </li> </ul> </div> <table class="source_code"> <tr> <td> <pre class="lines"> 15 16 17 18 19 20</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/dropbox_api/endpoints/files/copy.rb', line 15</span> <span class='id identifier rubyid_add_endpoint'>add_endpoint</span> <span class='symbol'>:copy</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_from'>from</span><span class='comma'>,</span> <span class='id identifier rubyid_to'>to</span><span class='op'>|</span> <span class='id identifier rubyid_perform_request'>perform_request</span><span class='lparen'>(</span><span class='lbrace'>{</span> <span class='label'>from_path:</span> <span class='id identifier rubyid_from'>from</span><span class='comma'>,</span> <span class='label'>to_path:</span> <span class='id identifier rubyid_to'>to</span> <span class='rbrace'>}</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> </div> </div> <div id="footer"> Generated on Sun Feb 7 11:51:56 2021 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.26 (ruby-2.5.1). </div> </div> </body> </html>