omniClientReadFile

Defined in OmniClient.h

OmniClientRequestId omniClientReadFile(char const *url, void *userData, OmniClientReadFileCallback callback)

Read the entire file.

The content buffer is normally freed after the callback returns. To prevent this, take ownership of the content buffer by calling omniClientMoveContent. You are then responsible for calling omniClientFreeContent when you’re finished with it. For example:

OmniClientContent myContent = omniClientMoveContent(*content);
omniClientFreeContent(myContent);

Note

If this function is called after omniClientShutdown, kInvalidRequestId will be returned, and the callback will not be called.