file_manager: report additional info in response to get_directory

Include the root's name and its permissions.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2021-10-30 16:49:41 -04:00
parent e9b06472c1
commit b55b21921a
1 changed files with 4 additions and 0 deletions

View File

@ -405,6 +405,10 @@ class FileManager:
flist['files'].append(path_info)
usage = shutil.disk_usage(path)
flist['disk_usage'] = usage._asdict()
flist['root_info'] = {
'name': root,
'permissions': "rw" if root in self.full_access_roots else "r"
}
return flist
def get_path_info(self, path: str, root: str) -> Dict[str, Any]: