D - number of dirs, F - number of files. Answer: `D * F`.

Won't thread pool queue all this stuff and run in fixed amount of threads?