title: What is the difference between std::filesystem::copy() and std::filesystem::copy_file()?
body: <p>What is the difference between <code>std::filesystem::copy()</code> and <code>std::filesystem::copy_file()</code> in this code?</p>
  
  <pre><code>#include &lt;filesystem&gt;
  
  void testing()
  {
      const std::filesystem::path src = "foo.txt";
      const std::filesystem::path dst = "bar.txt";
  
      std::filesystem::copy(     src, dst, std::filesystem::copy_options::overwrite_existing);
      std::filesystem::copy_file(src, dst, std::filesystem::copy_options::overwrite_existing);
  }
  </code></pre>
  
  <p>Docs say:</p>
  
  <ul>
  <li><code>copy()</code>: "copies files or directories"</li>
  <li><code>copy_file()</code>: "copies file contents"</li>
  </ul>
  
  <p>Since I'm copying a single file and not directories in this example, are these two calls the same?</p>
  
  <p>(I'm using g++ 8.2.0.  Remember to link against libstdc++fs otherwise you'll have undefined references to std::filesystem.)</p>