MCPcopy Create free account
hub / github.com/dhbloo/rapfi / makeFileListFromPathList

Function makeFileListFromPathList

Rapfi/core/utils.cpp:366–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364}
365
366std::vector<std::string> makeFileListFromPathList(const std::vector<std::string> &paths,
367 const std::vector<std::string> &extensions)
368{
369 std::vector<std::string> filenames;
370 for (const auto &path : paths) {
371 if (std::filesystem::is_directory(pathFromConsoleString(path))) {
372 auto fn = listAllFilesInDirRecursively(path, extensions);
373 filenames.insert(filenames.end(), fn.begin(), fn.end());
374 }
375 else {
376 filenames.push_back(path);
377 }
378 }
379 return filenames;
380}
381
382bool ensureDir(std::string dirpath, bool raiseException)
383{

Callers 2

tuningMethod · 0.85
dataprepMethod · 0.85

Calls 6

pathFromConsoleStringFunction · 0.85
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected