MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / SetFileTimestamp

Function SetFileTimestamp

apps/tools/Tools/commands/PboCommand.cpp:156–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154 times.actime = static_cast<time_t>(timestamp);
155 times.modtime = static_cast<time_t>(timestamp);
156 return utime(path.c_str(), &times) == 0;
157#endif
158}
159
160} // namespace
161
162std::string PboCommand::StripPboExtension(const std::string& path)
163{
164 // QFBank::open() appends ".pbo" automatically
165 if (path.size() >= 4)
166 {
167 std::string ext = path.substr(path.size() - 4);
168 for (auto& c : ext)
169 c = static_cast<char>(tolower(static_cast<unsigned char>(c)));
170 if (ext == ".pbo")
171 return path.substr(0, path.size() - 4);
172 }

Callers 1

ExtractMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected