copy_to_session#
- Session.copy_to_session(local_prefix: str, filelist: List[str], remote_prefix: str | None = None, progress: bool = False) list #
Copy a collection of files into the EnSight session.
Copy files from the local filesystem into the filesystem that is hosting the EnSight instance.
Note
For a
LocalLauncheransys.pyensight.core.LocalLauncher>
instance, these are the same filesystems.- Parameters:
- local_prefix
str
URL prefix to use for all files specified for the
filelist
parameter. The only protocol supported is'file://'
, which is the local filesystem.- filelist
list
List of files to copy. These files are prefixed with
local_prefix
and written relative to theremote_prefix
parameter appended tosession.launcher.session_directory
.- remote_prefix
str
Directory on the remote (EnSight) filesystem, which is the destination for the files. This prefix is appended to
session.launcher.session_directory
.- progressbool,
optional
Whether to show a progress bar. The default is
False
. IfTrue
and thetqdm
module is available, a progress bar is shown.
- local_prefix
- Returns:
list
List of the filenames that were copied and their sizes.
Examples
>>> the_files = ["fluent_data_dir", "ensight_script.py"] >>> session.copy_to_session("file:///D:/data", the_files, progress=True)
>>> the_files = ["fluent_data_dir", "ensight_script.py"] >>> session.copy_to_session("file:///scratch/data", the_files, remote_prefix="data")