# Path: rash/utils/confutils.py
# def get_config_directory(appname):
#     """
#     Get OS-specific configuration directory.
# 
#     :type appname: str
#     :arg  appname: capitalized name of the application
# 
#     """
#     if platform.system().lower() == 'windows':
#         path = os.path.join(os.getenv('APPDATA') or '~', appname, appname)
#     elif platform.system().lower() == 'darwin':
#         path = os.path.join('~', 'Library', 'Application Support', appname)
#     else:
#         path = os.path.join(os.getenv('XDG_CONFIG_HOME') or '~/.config',
#                             appname.lower())
#     return os.path.expanduser(path)
# 
# Path: rash/utils/pathutils.py
# def mkdirp(path):
#     """
#     Make directory at `path` if it does not exist.
#     """
#     if not os.path.isdir(path):
#         os.makedirs(path)


import os
from .utils.confutils import get_config_directory
from .utils.pathutils import mkdirp
        self.data_path = os.path.join(self.base_path, 'data')
        """
        Directory to store data collected by RASH (``~/.config/rash/data``).
        """

        self.record_path = os.path.join(self.data_path, 'record')
        """
        Shell history is stored in this directory at the first stage.
        """

        self.db_path = os.path.join(self.data_path, 'db.sqlite')
        """
        Shell history is stored in the DB at this path.
        """

        self.daemon_pid_path = os.path.join(self.base_path, 'daemon.pid')
        """
        A file to store daemon PID (``~/.config/rash/daemon.pid``).
        """

        self.daemon_log_path = os.path.join(self.base_path, 'daemon.log')
        """
        Daemon log file (``~/.config/rash/daemon.log``).
        """

        self.daemon_log_level = 'INFO'  # FIXME: make this configurable
        """
        Daemon log level.
        """


# Path: rash/utils/confutils.py
# def get_config_directory(appname):
#     """
#     Get OS-specific configuration directory.
# 
#     :type appname: str
#     :arg  appname: capitalized name of the application
# 
#     """
#     if platform.system().lower() == 'windows':
#         path = os.path.join(os.getenv('APPDATA') or '~', appname, appname)
#     elif platform.system().lower() == 'darwin':
#         path = os.path.join('~', 'Library', 'Application Support', appname)
#     else:
#         path = os.path.join(os.getenv('XDG_CONFIG_HOME') or '~/.config',
#                             appname.lower())
#     return os.path.expanduser(path)
# 
# Path: rash/utils/pathutils.py
# def mkdirp(path):
#     """
#     Make directory at `path` if it does not exist.
#     """
#     if not os.path.isdir(path):
#         os.makedirs(path)


# Path: rash/config.py
import os
from .utils.confutils import get_config_directory
from .utils.pathutils import mkdirp

        self.data_path = os.path.join(self.base_path, 'data')
        """
        Directory to store data collected by RASH (``~/.config/rash/data``).
        """

        self.record_path = os.path.join(self.data_path, 'record')
        """
        Shell history is stored in this directory at the first stage.
        """

        self.db_path = os.path.join(self.data_path, 'db.sqlite')
        """
        Shell history is stored in the DB at this path.
        """

        self.daemon_pid_path = os.path.join(self.base_path, 'daemon.pid')
        """
        A file to store daemon PID (``~/.config/rash/daemon.pid``).
        """

        self.daemon_log_path = os.path.join(self.base_path, 'daemon.log')
        """
        Daemon log file (``~/.config/rash/daemon.log``).
        """

        self.daemon_log_level = 'INFO'  # FIXME: make this configurable
        """
        Daemon log level.
        """


        mkdirp(self.record_path)