| 1769 | } |
| 1770 | |
| 1771 | bool IGFD::FileInfos::SearchForExt(const std::string& vExt, const bool vIsCaseInsensitive, const size_t& vMaxLevel) const { |
| 1772 | if (!vExt.empty()) { |
| 1773 | const auto& ext_to_check = vIsCaseInsensitive ? Utils::LowerCaseString(vExt) : vExt; |
| 1774 | const auto& ext_levels = vIsCaseInsensitive ? fileExtLevels_optimized : fileExtLevels; |
| 1775 | if (vMaxLevel >= 1 && countExtDot >= vMaxLevel) { |
| 1776 | for (const auto& ext : ext_levels) { |
| 1777 | if (!ext.empty() && ext == ext_to_check) { |
| 1778 | return true; |
| 1779 | } |
| 1780 | } |
| 1781 | } else { |
| 1782 | return (fileExtLevels[0] == vExt); |
| 1783 | } |
| 1784 | } |
| 1785 | return false; |
| 1786 | } |
| 1787 | |
| 1788 | bool IGFD::FileInfos::SearchForExts(const std::string& vComaSepExts, const bool vIsCaseInsensitive, const size_t& vMaxLevel) const { |
| 1789 | if (!vComaSepExts.empty()) { |