ansys.dyna.core.pre.examples.download_utilities.DownloadManager#
- class ansys.dyna.core.pre.examples.download_utilities.DownloadManager#
Manages downloads of example files.
Local paths are saved in this class so that a global cleanup of example files can be performed when the client is closed.
- downloads_list = []#
- add_file(file_path: str)#
Add the path for a downloaded example file to a list.
This list keeps track of where example files are downloaded so that a global cleanup of these files can be performed when the client is closed.
- Parameters:
- file_path
str Local path of the downloaded example file.
- file_path
- clear_download_cache()#
Remove downloaded example files from the local path.
- download_file(filename: str, *directory: str, destination: str | None = None, force: bool = False) str#
Download an example file from the PyPrimeMesh repository.
- Parameters:
- filename
str Name of the example file to download.
- destination
str,optional Path to download the example file to. The default is
None, in which case the default path for app data is used.- forcebool,
optional Whether to always download the example file. The default is
False, in which case if the example file is cached, it is reused.- directory
tuple[str] Path under the PyAnsys Github examples repository.
- filename
- Returns: