def get_fs_info(path):
 hddinfo = os.statvfs(path)
 total = (hddinfo.f_frsize * hddinfo.f_blocks)
 free = (hddinfo.f_frsize * hddinfo.f_bavail)
 used = (hddinfo.f_frsize * (hddinfo.f_blocks - hddinfo.f_bfree))
 return {'total': total, 'free': free, 'used': used}

def get_fs_info ( path ) : hddinfo = os . statvfs ( path ) total = ( hddinfo . f_frsize * hddinfo . f_blocks ) free = ( hddinfo . f_frsize * hddinfo . f_bavail ) used = ( hddinfo . f_frsize * ( hddinfo . f_blocks - hddinfo . f_bfree ) ) return { 'total' : total , 'free' : free , 'used' : used }
get free/used/total space info for a filesystem .