MCPcopy Create free account
hub / github.com/NVIDIA-RTX/RTXPT / GetFileModifiedTime

Function GetFileModifiedTime

Rtxpt/SampleCommon/SampleCommon.cpp:598–616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

596}
597
598std::optional<std::filesystem::file_time_type> GetFileModifiedTime(const std::filesystem::path & file)
599{
600 std::error_code ec;
601
602 if (!fs::exists(file, ec) || !fs::is_regular_file(file, ec))
603 {
604 //log::info("File does not exist or is not a regular file: '%s'", file.string().c_str());
605 return std::nullopt;
606 }
607
608 auto ftime = fs::last_write_time(file, ec);
609 if (ec)
610 {
611 log::warning("Failed to get last write time for file '%s', error: %s", file.string().c_str(), ec.message().c_str());
612 return std::nullopt;
613 }
614
615 return ftime;
616}
617
618size_t FindSubStringIgnoreCase(const std::string & text, const std::string & subString)
619{

Callers 1

IsCompiledShaderUpToDateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected