docs: public static final void copy(Path source, Path target, CopyOption... options) throws IOException
      {
          if (Files.isRegularFile(target))
          {
              if (Files.isRegularFile(target))
              {
                  Files.copy(source, target, options);
              }
              else
              {
                  if (Files.isDirectory(target))
                  {
                      Path t = target.resolve(source.getFileName());
                      Files.copy(source, t, options);
                  }
              }
          }
          else
          {
              if (Files.isDirectory(source) && Files.isDirectory(target))
              {
                  Map<Path,Path> fileMap = new HashMap<>();
                  Path fileName = source.getFileName();
                  final Path dir = fileName != null ? target.resolve(fileName) : target;
                  Files.createDirectories(target);
                  Files.walk(source).forEach((p)->
                  {
                      try
                      {
                          Path trg = dir.resolve(source.relativize(p));
                          if (Files.isDirectory(p))
                          {
                              Files.copy(p, trg, options);
                          }
                          else
                          {
                              if (Files.isSymbolicLink(p))
                              {
                                  Path symLink = Files.readSymbolicLink(p);
                                  Path symTrg = source.relativize(symLink.toAbsolutePath());
                                  Files.createSymbolicLink(trg, symTrg);
                              }
                              else
                              {
                                  if (Files.isRegularFile(p))
                                  {
                                      boolean hardLink = false;
                                      for (Path sp : fileMap.keySet())
                                      {
                                          if (Files.isSameFile(p, sp))
                                          {
                                              Path ht = fileMap.get(sp);
                                              Files.createLink(trg, ht);
                                              hardLink = true;
                                          }
                                      }
                                      if (!hardLink)
                                      {
                                          Files.copy(p, trg, options);
                                          fileMap.put(p, trg);
                                      }
                                  }
                              }
                          }
                      }
                      catch (IOException ex)
                      {
                          throw new RuntimeException(ex);
                      }
                  });
              }