def get_device_info(path):
try:
info = psutil.disk_usage(os.path.realpath(path))
return {"total": humanize_bytes(info.total),
"used": humanize_bytes(info.used),
"free": humanize_bytes(info.free)}
except OSError as e:
return {"ERROR": str(e)}
评论列表
文章目录