public static void copyDir(Path src, Path dest) {
        try {
            Files.walkFileTree(src, new CopyFileVisitor(src, dest));
        } catch (IOException e) {
            throw new RuntimeException(String.format(
                    "Error copying directory from \"%s\" to \"%s\": %s",
                    src,
                    dest,
                    e.getMessage()), e);
        }
    }
Delete a directory and all files within.

<p>Any found symlink is deleted, but the contents of a symlink are not deleted.

@param dir Directory to delete.
@return Returns true if the directory was deleted, or false if the directory does not exist.
@throws IllegalArgumentException if the given path is not a directory.
@throws RuntimeException if unable to delete a file or directory.
smithy-utils/src/main/java/software/amazon/smithy/utils/IoUtils.java