:py:mod:`dissect.target.helpers.nfs.client.mount` ================================================= .. py:module:: dissect.target.helpers.nfs.client.mount Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: dissect.target.helpers.nfs.client.mount.Client .. py:exception:: MountError(message: str, mount_stat: dissect.target.helpers.nfs.nfs3.MountStat) Bases: :py:obj:`dissect.target.exceptions.Error` Generic dissect.target error. .. py:attribute:: message .. py:attribute:: mount_stat .. py:method:: __str__() -> str Return str(self). .. py:class:: Client(rpc_client: dissect.target.helpers.sunrpc.client.AbstractClient) Bases: :py:obj:`contextlib.AbstractContextManager` An abstract base class for context managers. .. py:attribute:: DIR_COUNT :value: 4096 .. py:attribute:: MAX_COUNT :value: 32768 .. py:attribute:: READ_CHUNK_SIZE :value: 1048576 .. py:method:: __enter__() -> Self Return ``self`` upon entering the runtime context. .. py:method:: __exit__(_: type[BaseException] | None, __: BaseException | None, ___: types.TracebackType | None) -> bool Raise any exception triggered within the runtime context. .. py:method:: connect(hostname: str, port: int, local_port: int | dissect.target.helpers.sunrpc.client.LocalPortPolicy = 0, timeout_in_seconds: float | None = 5.0) -> Client :classmethod: Utility function to setup a connection to a NFS Mount Server :param hostname: The remote hostname. :param port: The remote port. :param local_port: The local port to bind to. If equal to ``LocalPortPolicy.PRIVILEGED`` or -1, bind to the first free privileged port. If equal to ``LocalPortPolicy.ANY`` or 0, bind to any free port. Otherwise, bind to the specified port. :param timeout_in_seconds: The timeout for making the connection. .. py:method:: close() -> None .. py:method:: mount(remote_path: str) -> dissect.target.helpers.nfs.nfs3.MountOK