_Downloader.cdd
- classmethod _Downloader.cdd(*sub_dir, mkdir=False, **kwargs)
Change directory to default download directory and its subdirectories or a specific file.
- Parameters:
sub_dir (str or os.PathLike[str]) – name of directory; names of directories (and/or a filename)
mkdir (bool) – whether to create a directory, defaults to
False
kwargs – [optional] parameters of pyhelpers.dirs.cd()
- Returns:
an absolute pathname to a directory (or a file)
- Return type:
str or os.PathLike[str]
Tests:
>>> from pydriosm.downloader import _Downloader >>> import os >>> os.path.relpath(_Downloader.cdd()) 'osm_data'