| 2128 | } |
| 2129 | |
| 2130 | void IGFD::FileManager::m_AddPath(const FileDialogInternal& vFileDialogInternal, const std::string& vPath, const std::string& vFileName, const FileType& vFileType) { |
| 2131 | if (!vFileType.isDir()) return; |
| 2132 | |
| 2133 | auto pInfos = FileInfos::create(); |
| 2134 | |
| 2135 | pInfos->filePath = vPath; |
| 2136 | pInfos->fileNameExt = vFileName; |
| 2137 | pInfos->fileNameExt_optimized = Utils::LowerCaseString(pInfos->fileNameExt); |
| 2138 | pInfos->fileType = vFileType; |
| 2139 | |
| 2140 | if (pInfos->fileNameExt.empty() || (pInfos->fileNameExt == "." && !vFileDialogInternal.filterManager.dLGFilters.empty())) { // filename empty or filename is the current dir '.' //-V807 |
| 2141 | return; |
| 2142 | } |
| 2143 | |
| 2144 | if (pInfos->fileNameExt != ".." && (vFileDialogInternal.getDialogConfig().flags & ImGuiFileDialogFlags_DontShowHiddenFiles) && pInfos->fileNameExt[0] == '.') { // dont show hidden files |
| 2145 | if (!vFileDialogInternal.filterManager.dLGFilters.empty() || (vFileDialogInternal.filterManager.dLGFilters.empty() && pInfos->fileNameExt != ".")) { // except "." if in directory mode //-V728 |
| 2146 | return; |
| 2147 | } |
| 2148 | } |
| 2149 | |
| 2150 | vFileDialogInternal.filterManager.FillFileStyle(pInfos); |
| 2151 | |
| 2152 | m_CompleteFileInfos(pInfos); |
| 2153 | |
| 2154 | if (m_CompleteFileInfosWithUserFileAttirbutes(vFileDialogInternal, pInfos)) { |
| 2155 | m_PathList.push_back(pInfos); |
| 2156 | } |
| 2157 | } |
| 2158 | |
| 2159 | void IGFD::FileManager::ScanDir(const FileDialogInternal& vFileDialogInternal, const std::string& vPath) { |
| 2160 | std::string path = vPath; |
nothing calls this directly
no test coverage detected