MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / getFastLutFileHash

Method getFastLutFileHash

src/OpenColorIO/OCIOZArchive.cpp:622–639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

620}
621
622std::string CIOPOciozArchive::getFastLutFileHash(const char * filepath) const
623{
624 std::string hash = "";
625 // Check into the map to check if the file exists in the archive.
626 // The key is the full path of the file inside the archive and the value is the hash.
627 // Normalize filepath and find it in the std::map.
628 std::string fpath = pystring::os::path::normpath(filepath);
629 for (auto it = m_entries.begin(); it != m_entries.end(); ++it)
630 {
631 // Verify that the key and the specfied filepath matches while ignoring the slashes
632 // differences in platforms.
633 if (mz_path_compare_wc(it->first.c_str(), fpath.c_str(), 1) == MZ_OK)
634 {
635 hash = std::string(it->second);
636 }
637 }
638 return hash;
639}
640
641void CIOPOciozArchive::setArchiveAbsPath(const std::string & absPath)
642{

Callers 1

GetFastFileHashFunction · 0.45

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected