# Open binary file stream to read a portion of file

**URL:** <https://forums.unrealengine.com/t/open-binary-file-stream-to-read-a-portion-of-file/373885>\
**Category:** C++\
**Tags:** unreal-engine, UE4, CPP, question\
**Created:** [October 20, 2016, 8:32am UTC](https://forums.unrealengine.com/t/open-binary-file-stream-to-read-a-portion-of-file/373885 "2016-10-20T08:32:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_2f46fb931](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2f46fb931](https://forums.unrealengine.com/u/anonymous_user_2f46fb931)\
**Post date:** [October 20, 2016, 8:32am UTC](https://forums.unrealengine.com/t/open-binary-file-stream-to-read-a-portion-of-file/373885/1 "2016-10-20T08:32:06Z")

</div>

Hi,

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

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

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.

---

<div class="post-metadata">

**Author:** ![MaKiPL](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/makipl/32/570787_2.png) [@MaKiPL](https://forums.unrealengine.com/u/MaKiPL)\
**Post date:** [September 13, 2022, 1:10am UTC](https://forums.unrealengine.com/t/open-binary-file-stream-to-read-a-portion-of-file/373885/2 "2022-09-13T01:10:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Emaer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/emaer/32/570877_2.png) [@Emaer](https://forums.unrealengine.com/u/Emaer)\
**Post date:** [September 13, 2022, 8:07am UTC](https://forums.unrealengine.com/t/open-binary-file-stream-to-read-a-portion-of-file/373885/3 "2022-09-13T08:07:54Z")

</div>

Unreal has [FPlatformFileManager](https://docs.unrealengine.com/4.27/en-US/API/Runtime/Core/HAL/FPlatformFileManager/), which gives you access to [IPlatformFile](https://docs.unrealengine.com/4.27/en-US/API/Runtime/Core/GenericPlatform/IPlatformFile/), and this interface gives you [IFileHandle](https://docs.unrealengine.com/4.27/en-US/API/Runtime/Core/GenericPlatform/IFileHandle/)
