p>
<p>If <code>newPath</code> identifies an existing file, that file is
replaced. If <code>newPath</code> identifies an existing directory the
operation fails and an exception is thrown.</p>
    </section>
    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span></h2>
      <pre class="language-dart"><code class="language-dart">File renameSync(String newPath);</code></pre>
    </section>

  </div> <!-- /.main-content -->

  <div id="dartdoc-sidebar-right" class="col-xs