file_manager: add disk usage to directory listing

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2021-01-01 17:06:33 -05:00
parent a535e6e94a
commit 67f992dabd
1 changed files with 2 additions and 0 deletions

View File

@ -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):