Navigation
API > API/Runtime > API/Runtime/Core
An FPreloadableArchive that is customized for reading files from IFileManager.
This class also supports registration of instances of this class by filename, which other systems in the engine can use to request an FArchive for the preload file, if it exists, replacing a call they would otherwise make to IFileManager::Get().CreateFileReader.
As with the base class, the preloading can work in either PreloadBytes or PreloadHandle mode.
Activate PreloadBytes mode by passing Flags::PreloadBytes to InitializeAsync. Activate PreloadHandle mode by passing Flags::PreloadHandle to InitializeAsync, optionally or'd with Flags::Prime.
| Name | FPreloadableFile |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Misc/PreloadableFile.h |
| Include Path | #include "Misc/PreloadableFile.h" |
Syntax
class FPreloadableFile : public FPreloadableArchive
Inheritance Hierarchy
- FArchiveState → FArchive → FPreloadableArchive → FPreloadableFile
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPreloadableFile
(
FStringView FileName |
Misc/PreloadableFile.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| RegisteredFiles | TMap< FString, TSharedPtr< FPreloadableFile > > | Map used for TryTakeArchive registration. | Misc/PreloadableFile.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void InitializeAsync
(
uint32 InFlags, |
Initialize the FPreloadableFile asynchronously, performing FileOpen operations on another thread. | Misc/PreloadableFile.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool TryRegister
(
const TSharedPtr< FPreloadableFile >& PreloadableFile |
Registration. | Misc/PreloadableFile.h | |
static FArchive * TryTakeArchive
(
const TCHAR* FileName |
Look up an FPreloadableFile instance registered for the given FileName, and return an FArchive from it. | Misc/PreloadableFile.h | |
static bool UnRegister
(
const TSharedPtr< FPreloadableFile >& PreloadableFile |
Remove the FPreloadableFile instance if it is registered for its FileName. | Misc/PreloadableFile.h |