mlos_bench.services.base_fileshare
==================================

.. py:module:: mlos_bench.services.base_fileshare

.. autoapi-nested-parse::

   Base class for remote file shares.



Classes
-------

.. autoapisummary::

   mlos_bench.services.base_fileshare.FileShareService


Module Contents
---------------

.. py:class:: FileShareService(config: dict[str, Any] | None = None, global_config: dict[str, Any] | None = None, parent: mlos_bench.services.base_service.Service | None = None, methods: dict[str, collections.abc.Callable] | list[collections.abc.Callable] | None = None)

   Bases: :py:obj:`mlos_bench.services.base_service.Service`, :py:obj:`mlos_bench.services.types.fileshare_type.SupportsFileShareOps`


   An abstract base of all file shares.

   Create a new file share with a given config.

   :param config: Free-format dictionary that contains the file share configuration.
                  It will be passed as a constructor parameter of the class
                  specified by `class_name`.
   :type config: dict
   :param global_config: Free-format dictionary of global parameters.
   :type global_config: dict
   :param parent: Parent service that can provide mixin functions.
   :type parent: Service
   :param methods: New methods to register with the service.
   :type methods: Union[dict[str, Callable], list[Callable], None]


   .. py:method:: download(params: dict, remote_path: str, local_path: str, recursive: bool = True) -> None
      :abstractmethod:


      Downloads contents from a remote share path to a local path.

      :param params: Flat dictionary of (key, value) pairs of (optional) connection details.
      :type params: dict
      :param remote_path: Path to download from the remote file share, a file if recursive=False
                          or a directory if recursive=True.
      :type remote_path: str
      :param local_path: Path to store the downloaded content to.
      :type local_path: str
      :param recursive: If False, ignore the subdirectories;
                        if True (the default), download the entire directory tree.
      :type recursive: bool



   .. py:method:: upload(params: dict, local_path: str, remote_path: str, recursive: bool = True) -> None
      :abstractmethod:


      Uploads contents from a local path to remote share path.

      :param params: Flat dictionary of (key, value) pairs of (optional) connection details.
      :type params: dict
      :param local_path: Path to the local directory to upload contents from.
      :type local_path: str
      :param remote_path: Path in the remote file share to store the uploaded content to.
      :type remote_path: str
      :param recursive: If False, ignore the subdirectories;
                        if True (the default), upload the entire directory tree.
      :type recursive: bool