pyrosm.OSM.clear_downloads

pyrosm.OSM.clear_downloads#

static OSM.clear_downloads(filepath=None)#

Remove PBF files downloaded by get_data from the default download directory (<tempdir>/pyrosm). The result cache and the bundled package datasets are left untouched.

Parameters:

filepath (str | os.PathLike (optional)) – A downloaded file’s path or bare filename to remove just that file; when None (default) every downloaded *.pbf in the directory is removed.

Returns:

The number of files removed.

Return type:

int