FsManagerKtx
A manager of the File System group of Mcu Manager, with suspending methods and flows. It wraps FsManager.
Every suspending method waits until the response is received, and throws a McuMgrException if the request fails, or a McuMgrErrorException if the device responds with an error, that is with a non-zero return code. Cancelling the calling coroutine stops waiting for the response, but does not cancel the request, which has already been sent.
The upload and the download of a file are long-running, and report their state using a Flow. See TransferState.
Use the manager to set a logger, the upload MTU, etc.
Properties
Functions
Closes all the files opened by the manager on the device.
Calculates the CRC32 of a file.
Calculates the CRC32 of a part of a file.
Downloads a file from the device.
Downloads a file from the device, writing it to the given stream.
Reads a single packet of a file, starting from the given offset.
Calculates the SHA-256 of a file.
Calculates the SHA-256 of a part of a file.
Reads the status of a file, such as its size.
Sends a single packet of a file, starting from the given offset.