copydir = async function copydir(src, dst) {
	let copydir = async (src, dst) => {
		await mkdir(dst, { recursive: true })

		for (const dirent of await readdir(src, { withFileTypes: true })) {
			await (dirent.isDirectory() ? copydir : copyFile)(
				src.dir.to(dirent.name),
				dst.dir.to(dirent.name)
			)
		}
	}

	copydir(URL.from(src), URL.from(dst))
}
Asynchronously copies dir to dest. By default, dest is overwritten if it already exists.