MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / createFromFile

Method createFromFile

Source/plugins/importers/PBRTImporter/Parser.cpp:89–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89std::unique_ptr<Tokenizer> Tokenizer::createFromFile(const std::filesystem::path& path)
90{
91 if (hasExtension(path, "gz"))
92 {
93 std::string str = decompressFile(path);
94 return std::make_unique<Tokenizer>(std::move(str), path);
95 }
96 else
97 {
98 std::string str = readFile(path);
99 return std::make_unique<Tokenizer>(std::move(str), path);
100 }
101}
102
103std::unique_ptr<Tokenizer> Tokenizer::createFromString(std::string str)
104{

Callers

nothing calls this directly

Calls 3

hasExtensionFunction · 0.85
decompressFileFunction · 0.85
readFileFunction · 0.85

Tested by

no test coverage detected