file_manager: add disk usage to directory listing
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
a535e6e94a
commit
67f992dabd
|
@ -285,6 +285,8 @@ class FileManager:
|
|||
elif os.path.isfile(full_path):
|
||||
path_info['filename'] = fname
|
||||
flist['files'].append(path_info)
|
||||
usage = shutil.disk_usage(path)
|
||||
flist['disk_usage'] = usage._asdict()
|
||||
return flist
|
||||
|
||||
def _get_path_info(self, path):
|
||||
|
|
Loading…
Reference in New Issue