<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.streamwrapper.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'streamwrapper.rename.php',
    1 => 'streamWrapper::rename',
    2 => 'Renames a file or directory',
  ),
  'up' => 
  array (
    0 => 'class.streamwrapper.php',
    1 => 'streamWrapper',
  ),
  'prev' => 
  array (
    0 => 'streamwrapper.mkdir.php',
    1 => 'streamWrapper::mkdir',
  ),
  'next' => 
  array (
    0 => 'streamwrapper.rmdir.php',
    1 => 'streamWrapper::rmdir',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/stream/streamwrapper/rename.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="streamwrapper.rename" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">streamWrapper::rename</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">streamWrapper::rename</span> &mdash; <span class="dc-title">Renames a file or directory</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-streamwrapper.rename-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>streamWrapper::rename</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$path_from</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$path_to</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   This method is called in response to <span class="function"><a href="function.rename.php" class="function">rename()</a></span>.
  </p>
  <p class="para">
   Should attempt to rename <code class="parameter">path_from</code> to
   <code class="parameter">path_to</code>
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    In order for the appropriate error message to be returned this method
    should <em>not</em> be defined if the wrapper does not support
    renaming files.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-streamwrapper.rename-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">path_from</code></dt>
     <dd>
      <p class="para">
       The URL to the current file.
      </p>
     </dd>
    
    
     <dt><code class="parameter">path_to</code></dt>
     <dd>
      <p class="para">
       The URL which the <code class="parameter">path_from</code> should be renamed to.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-streamwrapper.rename-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> on success or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> on failure.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-streamwrapper.rename-errors">
  <h3 class="title">Errors/Exceptions</h3>
  <p class="para">Emits
<strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> if call to this method fails
(i.e. not implemented).</p>
 </div>

 


 <div class="refsect1 notes" id="refsect1-streamwrapper.rename-notes">
  <h3 class="title">Notes</h3>
  <blockquote class="note"><p><strong class="note">Note</strong>: <p class="para">The
<var class="varname">streamWrapper::$context</var>
property is updated if a valid context is passed to the caller function.</p></p></blockquote>
 </div>

 
 <div class="refsect1 seealso" id="refsect1-streamwrapper.rename-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.rename.php" class="function" rel="rdfs-seeAlso">rename()</a> - Renames a file or directory</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>