title: How to recursively copy files and directories
body: <p>With C++, is it possible to recursively copy files and directories from one path to another</p>
  
  <ul>
  <li>without having to use any additional libraries?</li>
  <li>and with platform independent functions?</li>
  </ul>
  
  <p>Considering the following filesystem</p>
  
  <pre><code>src/fileInRoot
  src/sub_directory/
  src/sub_directory/fileInSubdir
  </code></pre>
  
  <p>I want to copy</p>
  
  <ol>
  <li>all files and directories or</li>
  <li>certain files and directories</li>
  </ol>
  
  <p>from <code>src</code> to another directory <code>target</code>.</p>
  
  <hr>
  
  <p>I've created a new question since the questions I've found are platform specific and don't include filtering:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/36428121/c-copy-directory-recursive-under-unix">C++ Copy directory recursive under unix</a> (unix)</li>
  <li><a href="https://stackoverflow.com/questions/37325875/copy-directory-content">Copy directory content</a> (linux)</li>
  <li><a href="https://stackoverflow.com/questions/1938679/c-c-copy-file-with-automatic-recursive-folder-directory-creation">C/C++ Copy file with automatic recursive folder/directory creation</a> (winapi)</li>
  </ul>