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
评论列表
文章目录