MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / m_AddPath

Method m_AddPath

external/ImGuiFileDialog/ImGuiFileDialog.cpp:2130–2157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2128}
2129
2130void 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
2159void IGFD::FileManager::ScanDir(const FileDialogInternal& vFileDialogInternal, const std::string& vPath) {
2160 std::string path = vPath;

Callers

nothing calls this directly

Calls 4

isDirMethod · 0.80
FillFileStyleMethod · 0.80
emptyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected