diff options
| author | crupest <crupest@outlook.com> | 2024-11-11 01:12:29 +0800 | 
|---|---|---|
| committer | Yuqian Yang <crupest@crupest.life> | 2025-01-03 23:41:03 +0800 | 
| commit | adec0f35eea3b9d955e5631d5b8e54092022116d (patch) | |
| tree | 0c13bf85cec332b02c7acd1d0edb42aa9da75a32 /tools/cru-py/cru/service/_config.py | |
| parent | 7e9fdc36310d1bc63af4f4a0fc2f4963ae0154aa (diff) | |
| download | crupest-adec0f35eea3b9d955e5631d5b8e54092022116d.tar.gz crupest-adec0f35eea3b9d955e5631d5b8e54092022116d.tar.bz2 crupest-adec0f35eea3b9d955e5631d5b8e54092022116d.zip  | |
HALF WORK: 2024.1.3
Diffstat (limited to 'tools/cru-py/cru/service/_config.py')
| -rw-r--r-- | tools/cru-py/cru/service/_config.py | 15 | 
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/cru-py/cru/service/_config.py b/tools/cru-py/cru/service/_config.py new file mode 100644 index 0000000..1838015 --- /dev/null +++ b/tools/cru-py/cru/service/_config.py @@ -0,0 +1,15 @@ +import os.path +from ._base import AppFeatureProvider +from ._data import DataManager + + +class ConfigManager(AppFeatureProvider): +    def __init__(self, config_file_name="config") -> None: +        super().__init__("config-manager") +        self._file_name = config_file_name + +    @property +    def config_file_path(self) -> str: +        return os.path.join( +            self.app.get_feature(DataManager).data_dir.full_path, self._file_name +        )  | 
