Implemented fetching of directory tree with descriptions

This commit is contained in:
Zvonimir Sabljic
2023-08-08 15:46:34 +02:00
parent 4ecf2229d1
commit 2fe6a8d525
4 changed files with 13 additions and 9 deletions

View File

@@ -66,8 +66,12 @@ class Project:
self.developer.start_coding()
def get_directory_tree(self):
return build_directory_tree(self.root_path + '/', ignore=IGNORE_FOLDERS)
def get_directory_tree(self, with_descriptions=False):
files = {}
if with_descriptions:
files = File.select().where(File.app_id == self.args['app_id'])
files = {snapshot.name: snapshot for snapshot in files}
return build_directory_tree(self.root_path + '/', ignore=IGNORE_FOLDERS, files=files, add_descriptions=True)
def get_test_directory_tree(self):
# TODO remove hardcoded path