forked from platypush/platypush
[config] Added config.get_config_dir
method.
This commit is contained in:
parent
0f186c44ef
commit
ffc3fe218d
1 changed files with 8 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
import json
|
||||
import os
|
||||
|
||||
from platypush import Config
|
||||
from platypush.message import Message
|
||||
|
@ -66,5 +67,12 @@ class ConfigPlugin(Plugin):
|
|||
"""
|
||||
return Config._instance.config_file
|
||||
|
||||
@action
|
||||
def get_config_dir(self) -> str:
|
||||
"""
|
||||
:return: The path to the configuration directory.
|
||||
"""
|
||||
return os.path.dirname(Config._instance.config_file)
|
||||
|
||||
|
||||
# vim:sw=4:ts=4:et:
|
||||
|
|
Loading…
Reference in a new issue