mlos_bench.services.types.fileshare_type module¶
Protocol interface for file share operations.
- class mlos_bench.services.types.fileshare_type.SupportsFileShareOps(*args, **kwargs)¶
Bases:
Protocol
Protocol interface for file share operations.
Methods
download
(params, remote_path, local_path[, ...])Downloads contents from a remote share path to a local path.
upload
(params, local_path, remote_path[, ...])Uploads contents from a local path to remote share path.
- download(params: dict, remote_path: str, local_path: str, recursive: bool = True) → None¶
Downloads contents from a remote share path to a local path.
- Parameters:
- paramsdict
Flat dictionary of (key, value) pairs of (optional) connection details.
- remote_pathstr
Path to download from the remote file share, a file if recursive=False or a directory if recursive=True.
- local_pathstr
Path to store the downloaded content to.
- recursivebool
If False, ignore the subdirectories; if True (the default), download the entire directory tree.
- upload(params: dict, local_path: str, remote_path: str, recursive: bool = True) → None¶
Uploads contents from a local path to remote share path.
- Parameters:
- paramsdict
Flat dictionary of (key, value) pairs of (optional) connection details.
- local_pathstr
Path to the local directory to upload contents from.
- remote_pathstr
Path in the remote file share to store the uploaded content to.
- recursivebool
If False, ignore the subdirectories; if True (the default), upload the entire directory tree.