3 ms·
The find utility is probably smarter than the other methods. I know two things to watch out for: sorting the directory entries and calling stat on each entry.
by Lanzaa 10y ago
The find utility is probably smarter than the other methods. I know two things to watch out for: sorting the directory entries and calling stat on each entry.
You might like to read the rationale section of PEP 471:
https://www.python.org/dev/peps/pep-0471/ https://www.python.org/dev/peps/pep-0471/