pydc_client.py 文件源码

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

项目:recobot 作者: h4ck3rk3y 项目源码 文件源码
def freespace(self,location): # Return free space in bytes avaialable at specfied location
        # Source: http://stackoverflow.com/questions/51658/cross-platform-space-remaining-on-volume-using-python
        if platform.system() == 'Windows':
            free_bytes = ctypes.c_ulonglong(0)
            ctypes.windll.kernel32.GetDiskFreeSpaceExW(ctypes.c_wchar_p(folder), None, None, ctypes.pointer(free_bytes))
            return free_bytes.value
        else: return os.statvfs(folder).f_bfree
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号