code: public static void copy(Path sourcePath, Path targetPath, boolean executable) throws IOException {
  		// we unwrap the file system to get raw streams without safety net
  		FileSystem sFS = FileSystem.getUnguardedFileSystem(sourcePath.toUri());
  		FileSystem tFS = FileSystem.getUnguardedFileSystem(targetPath.toUri());
  		if (!tFS.exists(targetPath)) {
  			if (sFS.getFileStatus(sourcePath).isDir()) {
  				internalCopyDirectory(sourcePath, targetPath, executable, sFS, tFS);
  			} else {
  				internalCopyFile(sourcePath, targetPath, executable, sFS, tFS);
  			}
  		}
  	}
docs: Copies all files from source to target and sets executable flag. Paths might be on different systems.
  @param sourcePath source path to copy from
  @param targetPath target path to copy to
  @param executable if target file should be executable
  @throws IOException if the copy fails