Bebop/bebop/fs.py
dece 0b79bd9e9e command_line: move input validation there
This absolutely un-atomic commit also introduces the Links class to hold
methods regarding link lookups on top of the standard dict class.
2021-03-13 20:38:56 +01:00

19 lines
431 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, join
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