dissect.target.helpers.nfs.client.mount¶
Module Contents¶
Classes¶
An abstract base class for context managers. |
- exception dissect.target.helpers.nfs.client.mount.MountError(message: str, mount_stat: dissect.target.helpers.nfs.nfs3.MountStat)¶
Bases:
dissect.target.exceptions.ErrorGeneric dissect.target error.
- message¶
- mount_stat¶
- __str__() str¶
Return str(self).
- class dissect.target.helpers.nfs.client.mount.Client(rpc_client: dissect.target.helpers.sunrpc.client.AbstractClient)¶
Bases:
contextlib.AbstractContextManagerAn abstract base class for context managers.
- DIR_COUNT = 4096¶
- MAX_COUNT = 32768¶
- READ_CHUNK_SIZE = 1048576¶
- __enter__() typing_extensions.Self¶
Return
selfupon entering the runtime context.
- __exit__(_: type[BaseException] | None, __: BaseException | None, ___: types.TracebackType | None) bool¶
Raise any exception triggered within the runtime context.
- classmethod connect(hostname: str, port: int, local_port: int | dissect.target.helpers.sunrpc.client.LocalPortPolicy = 0, timeout_in_seconds: float | None = 5.0) Client¶
Utility function to setup a connection to a NFS Mount Server
- Parameters:
hostname – The remote hostname.
port – The remote port.
local_port – The local port to bind to. If equal to
LocalPortPolicy.PRIVILEGEDor -1, bind to the first free privileged port. If equal toLocalPortPolicy.ANYor 0, bind to any free port. Otherwise, bind to the specified port.timeout_in_seconds – The timeout for making the connection.
- close() None¶
- mount(remote_path: str) dissect.target.helpers.nfs.nfs3.MountOK¶