file_manager: add get_directory method

This replaces the previous "get_sd_directory()" method, allowing
consumers to get any registered root path.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-03-03 19:46:18 -05:00
parent 393cfa2a0e
commit 18169f279e
No known key found for this signature in database
GPG Key ID: 7027245FBBDDF59A
1 changed files with 2 additions and 2 deletions

View File

@ -252,8 +252,8 @@ class FileManager:
check_passed = False
return check_passed
def get_sd_directory(self) -> str:
return self.file_paths.get('gcodes', "")
def get_directory(self, root: str = "gcodes") -> str:
return self.file_paths.get(root, "")
def get_registered_dirs(self) -> List[str]:
return list(self.file_paths.keys())