2021.4.6 #25

Merged
edraft merged 57 commits from 2021.4.6 into 2021.4.post1 2021-04-11 15:54:38 +02:00
2 changed files with 24 additions and 11 deletions
Showing only changes of commit dc849c4f71 - Show all commits

View File

@ -81,18 +81,22 @@ class ApplicationEnvironment(ApplicationEnvironmentABC):
@property
def working_directory(self) -> str:
return self._working_directory
def set_working_directory(self, path: str = ''):
if path != '':
self._working_directory = path
return
self._working_directory = pathlib.Path().absolute()
return str(self._working_directory)
@property
def runtime_directory(self) -> str:
return self._runtime_directory
return str(self._runtime_directory)
def set_runtime_directory(self, file: str):
self._runtime_directory = pathlib.Path(file).parent.absolute()
def set_runtime_directory(self, runtime_directory: str):
if runtime_directory != '':
self._runtime_directory = runtime_directory
return
self._runtime_directory = pathlib.Path().absolute()
def set_working_directory(self, working_directory: str):
if working_directory != '':
self._working_directory = working_directory
return
self._working_directory = pathlib.Path().absolute()

View File

@ -83,3 +83,12 @@ class ApplicationEnvironmentABC(ABC):
:return:
"""
pass
@abstractmethod
def set_working_directory(self, working_directory: str):
"""
Sets the current working directory
:param working_directory:
:return:
"""
pass