Open binary file stream to read a portion of file

Hi,

I followed Rama’s tutorial to save and load binary files in here

In the tutorial we load the entire file into binary array in memory, but in my case the binary files are really big, hence it is not a good idea to read the entire file at once. I would like to ask that is there anyway that I can open a file stream to read a portion of the file at a time?

Thank you very much for your help.
Kind regards.

bump, anyone?
FFileHelper loads whole file, but indeed, I need to create a support to read external non-UE files and I don’t want to store 800MB file in memory. If so, probably the only way so far that I see is creating a file streaming by yourself, which would need to be properly optimised/done across platforms, so probably on an interface. Maybe is there a ready marketplace plugin for that? Depends on the destination platform. Windows/Mac/Linux will all use the same std library for that, same goes for specific console (can’t hint name, NDA). The most problematic would be the mobiles which store files differently.

Unreal has FPlatformFileManager, which gives you access to IPlatformFile, and this interface gives you IFileHandle

2 Likes