call_report.core.default_download_dir#
- call_report.core.default_download_dir() Path[source]#
Return the folder call_report keeps downloaded files in.
The
CALL_REPORT_DOWNLOAD_DIRenvironment variable is used if it is set. Otherwise the folder iscall-reportinside the platform’s user data folder.Windows:
%LOCALAPPDATA%\call-reportmacOS:
~/Library/Application Support/call-reportOther platforms:
$XDG_DATA_HOME/call-report, or~/.local/share/call-reportwhenXDG_DATA_HOMEis not set.
Each source keeps its files in its own subfolder. The folder is not created here.
- Returns:
- pathlib.Path
The download folder, with any
~expanded.
Examples
>>> import os >>> from unittest import mock >>> with mock.patch.dict(os.environ, {"CALL_REPORT_DOWNLOAD_DIR": "/data/calls"}): ... default_download_dir().as_posix() '/data/calls'