Spaces:
Sleeping
Sleeping
File size: 408 Bytes
2ea3333 c948fd2 2ea3333 c948fd2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | import shutil
def check_disk_usage(path="/"):
"""
Description: Check the disk usage of the specified path.
Args:
path (str, optional): The path to check the disk usage for. Defaults to "/".
Returns:
(total, used, free): A tuple containing the total, used, and free disk space in bytes.
"""
total, used, free = shutil.disk_usage(path)
return total, used, free
|