@@ -734,8 +734,8 @@ def download_twin_builder_data(file_name, force_download=False, destination=None
734
734
return os .path .join (destination , "twin_builder" )
735
735
736
736
737
- @pyaedt_function_handler (filename = "name" )
738
- def download_file (directory , name = None , destination = None ):
737
+ @pyaedt_function_handler (filename = "name" , directory = "source" )
738
+ def download_file (source , name = None , destination = None ):
739
739
"""
740
740
Download a file or files from the online examples repository.
741
741
@@ -746,9 +746,10 @@ def download_file(directory, name=None, destination=None):
746
746
747
747
Parameters
748
748
----------
749
- directory : str
750
- Directory name in the Ansys ``example-data`` repository. If the ``pyaed/`` prefix
751
- is not part of ``directory`` it will be prepended.
749
+ source : str
750
+ Directory name in the Ansys ``example-data`` repository from which the example
751
+ data is to be retrieved. If the ``pyaedt/`` prefix
752
+ is not part of ``directory`` the path will be automatically prepended.
752
753
name : str, optional
753
754
File name to download. By default all files in ``directory``
754
755
will be downloaded.
@@ -770,13 +771,13 @@ def download_file(directory, name=None, destination=None):
770
771
'C:/Users/user/AppData/local/temp/PyAEDTExamples/motorcad'
771
772
"""
772
773
local_paths = []
773
- _download_file (directory , name , destination , local_paths )
774
+ _download_file (source , name , destination , local_paths )
774
775
if name :
775
776
return list (set (local_paths ))[0 ]
776
777
else :
777
778
if not destination :
778
779
destination = EXAMPLES_PATH
779
- destination_dir = os .path .join (destination , directory )
780
+ destination_dir = os .path .join (destination , source )
780
781
return destination_dir
781
782
782
783
0 commit comments