title: Copying a directory in Java
body: <p>Basically reading <a href="http://docs.oracle.com/javase/tutorial/essential/io/copy.html" rel="nofollow noreferrer">this</a> tutorial, I have come across a bit in which it explains how to use the REPLACE_EXISTING StandardCopyOption.</p>
  <blockquote>
  <p>REPLACE_EXISTING – Performs the copy even when the target file already
  exists. If the target is a symbolic link, the link itself is copied
  (and not the target of the link). If the target is a non-empty
  directory, the copy fails with the FileAlreadyExistsException
  exception.</p>
  </blockquote>
  <p>At the end of the bit I quoted, it says &quot;<strong>If the target is a non-empty directory, the copy fails with the FileAlreadyExistsException exception.</strong>&quot;
  Actually I have tried it and it does not give me any exception, I tried to copy a non-empty folder from a location to the Desktop and it succeeded without giving me the FileAlreadyExistsException that in theory I should have got.</p>
  <p>Is it something regular?</p>