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:
parent
393cfa2a0e
commit
18169f279e
|
@ -252,8 +252,8 @@ class FileManager:
|
||||||
check_passed = False
|
check_passed = False
|
||||||
return check_passed
|
return check_passed
|
||||||
|
|
||||||
def get_sd_directory(self) -> str:
|
def get_directory(self, root: str = "gcodes") -> str:
|
||||||
return self.file_paths.get('gcodes', "")
|
return self.file_paths.get(root, "")
|
||||||
|
|
||||||
def get_registered_dirs(self) -> List[str]:
|
def get_registered_dirs(self) -> List[str]:
|
||||||
return list(self.file_paths.keys())
|
return list(self.file_paths.keys())
|
||||||
|
|
Loading…
Reference in New Issue