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

Function getExtensionFromPath

Source/Falcor/Core/Platform/OS.cpp:246–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246std::string getExtensionFromPath(const std::filesystem::path& path)
247{
248 std::string ext;
249 if (path.has_extension())
250 {
251 ext = path.extension().string();
252 // Remove the leading '.' from ext.
253 if (ext.size() > 0 && ext[0] == '.')
254 ext.erase(0, 1);
255 // Convert to lower-case.
256 std::transform(ext.begin(), ext.end(), ext.begin(), [](char c) { return std::tolower(c); });
257 }
258 return ext;
259}
260
261std::filesystem::path getTempFilePath()
262{

Callers 5

onDroppedFileMethod · 0.85
saveImageDialogMethod · 0.85
importMethod · 0.85
hasExtensionFunction · 0.85
CPU_TESTFunction · 0.85

Calls 5

eraseMethod · 0.80
stringMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by 1

CPU_TESTFunction · 0.68