Tussilago/config/settings_utils.py

23 lines
544 B
Python

from typing import TYPE_CHECKING
from platformdirs import user_data_path
if TYPE_CHECKING:
from pathlib import Path
def get_data_dir() -> Path:
"""Get the directory where the application data will be stored.
This directory is created if it does not exist.
Returns:
Path: The directory where the application data will be stored.
"""
return user_data_path(
appauthor="TheLovinator",
appname="Tussilago",
ensure_exists=True,
roaming=True,
use_site_for_root=True,
)