|
FireSync API
|
| kStatus kStorage_DownloadToBuffer | ( | kStorage | storage, |
| const kChar * | filePath, | ||
| void * | buffer, | ||
| kSize | capacity, | ||
| kCallbackFx | progress, | ||
| kPointer | context | ||
| ) |
Reads the contents of a storage file into a memory buffer.
This function will fail if the capacity of the buffer does not match the size of the file.
If the remote node supports progress feedback, the specified callback will be invoked to provide updates on the progress of the operation. The callback 'args' parameter will receive a k32u value representing the percentage completed.
| storage | Storage object. |
| filePath | File path. |
| buffer | Receives data read from the file. |
| capacity | Buffer capacity. |
| progress | Optional progress callback (can be kNULL). |
| context | Callback context. |