[Python-ideas] Suggestion: Add shutil.get_dir_size

Serhiy Storchaka storchaka at gmail.com
Wed May 3 01:43:48 EDT 2017

On 02.05.17 22:07, Ram Rachum wrote:
> I have a suggestion: Add a function shutil.get_dir_size that gets the
> size of a directory, including all the items inside it recursively. I
> currently need this functionality and it looks like I'll have to write
> my own function for it.

The comprehensive implementation should take into account hard links, 
mount points, variable block sizes, sparse files, transparent files and 
blocks compression, file tails packing, blocks deduplication, additional 
file streams, file versioning, and many many other FS specific features. 
If you implement a module providing this feature, publish it on PyPI and 
prove its usefulness for common Python user, it may be considered for 
inclusion in the Python standard library.

More information about the Python-ideas mailing list