api.py 文件源码

python
阅读 46 收藏 0 点赞 0 评论 0

项目:django-sysinfo 作者: saxix 项目源码 文件源码
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)}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号