ID EN
Shutil

disk_usage

Python 3.11

Return disk usage statistics about the given path as a named tuple with the attributes total, used and free, which are the amount of total, used and free space, in bytes. path may be a file or a directory.

Syntax

PYTHON
shutil.disk_usage(path)

See Also

named tuple Availability