ansys.dyna.core.pre.examples.download_utilities#
Classes#
Manages downloads of example files. |
Module Contents#
- class ansys.dyna.core.pre.examples.download_utilities.DownloadManager[source]#
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.
- add_file(file_path: str)[source]#
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
- download_file(filename: str, *directory: str, destination: str | None = None, force: bool = False) str [source]#
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: