views.py 文件源码

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

项目:Prism 作者: Stumblinbear 项目源码 文件源码
def get_file_systems(self):
        systems = psutil.disk_partitions()

        for i in range(0, len(systems)):
            system = systems[i]

            system_options = {}
            for option in system.opts.split(','):
                option_local = prism.helpers.locale_('system', 'mount.options.' + option)
                if option != option_local:
                    system_options[option] = option_local
                else:
                    system_options[option] = prism.helpers.locale_('system', 'mount.options.unknown')

            systems[i] = {'device': system.device, 'mount_point': system.mountpoint,
                            'fs_type': system.fstype, 'options': system_options,
                            'usage': psutil.disk_usage(system.mountpoint)}

        return systems
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号