MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ lower_extension()

std::string MayaFlux::IO::Detail::lower_extension ( const std::string & path)
nodiscard

Lowercase extension of a path without its dot.

Definition at line 201 of file TensorCodec.cpp.

202{
203 auto ext = std::filesystem::path(path).extension().string();
204 if (!ext.empty() && ext[0] == '.')
205 ext.erase(0, 1);
206 std::ranges::transform(ext, ext.begin(), [](unsigned char c) { return static_cast<char>(std::tolower(c)); });
207 return ext;
208}

Referenced by MayaFlux::IO::TensorFormatRegistry::by_extension(), MayaFlux::IO::NpyReader::can_read(), MayaFlux::IO::NpzReader::can_read(), and MayaFlux::IO::SafetensorsReader::can_read().

Here is the caller graph for this function: