MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / GetFileReader

Function GetFileReader

pcsx2/CDVD/InputIsoFile.cpp:40–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40static std::unique_ptr<ThreadedFileReader> GetFileReader(const std::string& path)
41{
42 const std::string_view extension = Path::GetExtension(path);
43
44 if (StringUtil::compareNoCase(extension, "chd"))
45 return std::make_unique<ChdFileReader>();
46
47 if (StringUtil::compareNoCase(extension, "cso") || StringUtil::compareNoCase(extension, "zso"))
48 return std::make_unique<CsoFileReader>();
49
50 if (StringUtil::compareNoCase(extension, "gz"))
51 return std::make_unique<GzippedFileReader>();
52
53 if (StringUtil::compareNoCase(extension, "dump"))
54 return std::make_unique<BlockdumpFileReader>();
55
56 return std::make_unique<FlatFileReader>();
57}
58
59int InputIsoFile::ReadSync(u8* dst, uint lsn)
60{

Callers 1

OpenMethod · 0.85

Calls 1

compareNoCaseFunction · 0.85

Tested by

no test coverage detected