title: Copy folder recursively in Node.js
body: <p>Is there an easier way to copy a folder and all its content without manually doing a sequence of <code>fs.readir</code>, <code>fs.readfile</code>, <code>fs.writefile</code> recursively?</p>
  <p>I am just wondering if I'm missing a function which would ideally work like this:</p>
  <pre><code>fs.copy(&quot;/path/to/source/folder&quot;, &quot;/path/to/destination/folder&quot;);
  </code></pre>
  <hr />
  <p><em>Regarding this historic question. Note that <code>fs.cp</code> and <code>fs.cpSync</code> can copy folders recursively and are available in Node v16+</em></p>