This repository has been archived on 2024-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
Bebop/bebop/fs.py
2021-03-14 00:09:24 +01:00

19 lines
425 B
Python

"""Retrieve some paths from filesystem.
A lot of logic comes from `appdirs`:
https://github.com/ActiveState/appdirs/blob/master/appdirs.py
"""
from os import getenv
from os.path import expanduser
from pathlib import Path
APP_NAME = "bebop"
def get_user_data_path() -> Path:
"""Return the user data directory path."""
path = Path(getenv("XDG_DATA_HOME", expanduser("~/.local/share")))
return path / APP_NAME