download#
- MapdlGrpc.download(files, target_dir=None, extension=None, chunk_size=None, progress_bar=None, recursive=False)#
Download files from the gRPC instance working directory :rtype:
List[str]警告
This feature is only available for MAPDL 2021R1 or newer.
- パラメーター:
- files
strorList[str]ortuple(str) Name of the file on the server. File must be in the same directory as the mapdl instance. A list of string names or tuples of string names can also be used. List current files with
Mapdl.list_files.Alternatively, you can also specify glob expressions to match file names. For example: 'file*' to match every file whose name starts with 'file'.
- target_dir
str,optional Path where the downloaded files will be located. The default is the current working directory.
- extension
str,optional Filename with this extension will be considered. The default is None.
- chunk_size
int,optional Chunk size in bytes. Must be less than 4MB. The default is 256 kB.
- progress_barbool,
optional Display a progress bar using
tqdmwhenTrue. Helpful for showing download progress.- recursivebool,
optional Whether to use recursion when using glob pattern. The default is
False.
- files
Notes
There are some considerations to keep in mind when using this command:
The glob pattern search does not search recursively in remote instances.
In a remote instance, it is not possible to list or download files in different locations than the MAPDL working directory.
If you are in local and provide a file path, downloading files from a different folder is allowed. However it is not a recommended approach.
Examples
Download a single file:
>>> mapdl.download('file.out')
Download all the files starting with 'file':
>>> mapdl.download('file*')
Download every single file in the MAPDL working directory:
>>> mapdl.download('*.*')
Alternatively, you can download all the files using
Mapdl.download_project(recommended):>>> mapdl.download_project()