(path)
return _common.sdiskusage(total, used, free, percent)
Return disk usage associated with path.
Return disk usage associated with path.
Return disk usage associated with path .
def disk_usage(path):
    """Return disk usage associated with path."""
    try:
        total, free = cext.disk_usage(path)
    except WindowsError:
        if not os.path.exists(path):
            msg = "No such file or directory: '%s'" % path
            raise OSError(errno.ENOENT, msg)
        raise
    used = total - free
    percent = usage_percent(used, total, _round=1)
    return _common.sdiskusage(total, used, free, percent)
def disk_usage ( path ) : try : total , free = cext . disk_usage ( path ) except WindowsError : if not os . path . exists ( path ) : msg = "No such file or directory: '%s'" % path raise OSError ( errno . ENOENT , msg ) raise used = total - free percent = usage_percent ( used , total , _round = 1 ) return _common . sdiskusage ( total , used , free , percent )