FetchFileByIdToDisk (Unreal Engine)

- Declaration

static void FetchFileByIdToDisk(FString ContentId, FString FolderDestination, FCavrnusContentProgressFunction OnProgress, FCavrnusContentFileFunction OnContentLoaded);

Delegates Options:

DECLARE_DYNAMIC_DELEGATE_TwoParams(FCavrnusContentProgressFunction, float, Progress, FString, Step);

DECLARE_DYNAMIC_DELEGATE_OneParam(FCavrnusContentFileFunction, FString, fileDest);

typedef TFunction<void(float, const FString&)> CavrnusContentProgressFunction;

const TFunction<void(FString)>& OnContentLoaded;

- Description

Downloads an encrypted file to your device, placing it in the FolderDestination. This is primarily useful if you are using an Unreal Engine plugin that only understands a file on-disk. Otherwise it is recommended to use FetchFileById and use the bytes it gives you, since it saves space on your hard drive and prevents content from potentially being given out when it shouldn’t be.

Note that this file will not be deleted when Cavrnus shuts down. Once it is on your disk it is up to you how to deal with it.

Also note that during this process an unencrypted version of the file does appear on your device in the appdata folder.

- Blueprint Sample

(IMAGE COMING SOON!)

- Code Sample

TBD_SAMPLE.h:

//Coming Soon!

TBD_SAMPLE.cpp:

//Coming Soon!