MCPcopy Create free account
hub / github.com/Norbyte/bg3se / MakeFileReader

Method MakeFileReader

BG3Extender/GameDefinitions/GameHelpers.cpp:101–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99 }
100
101 FileReaderPin StaticSymbols::MakeFileReader(StringView path, PathRootType root, bool canonicalize) const
102 {
103 if (ls__PathRoots == nullptr || ls__FileReader__ctor == nullptr) {
104 ERR("StaticSymbols::MakeFileReader(): File reader API not available!");
105 return FileReaderPin(nullptr);
106 }
107
108 auto absolutePath = ToPath(path, root, canonicalize);
109
110 Path lsPath;
111 lsPath.Name = absolutePath;
112
113 auto reader = GameAlloc<FileReader>();
114 ls__FileReader__ctor(reader, lsPath, 2, 0);
115 return FileReaderPin(reader);
116 }
117
118 void StaticSymbols::DestroyFileReader(FileReader* reader)
119 {

Callers 4

LoadExternalFileFunction · 0.80
LoadConfigsMethod · 0.80
LuaLoadGameFileMethod · 0.80
HandleRequestSourceMethod · 0.80

Calls 1

FileReaderPinClass · 0.70

Tested by

no test coverage detected