/
thomas-king
/
Raze
Обзор
Документация
Войти
/
thomas-king
/
Raze
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
lib/Library/FileManager.cpp
41 строка
902 B
Ace Rodstin
Separate cache to SourceFilesCache and CompiledFilesCache
22 ноя 2023, 16:44
22 ноя 2023, 16:44
5f7fe14
Код
Авторство
О чём код?
// // FileManager.cpp // Library // // Created by Ace Rodstin on 11/23/23. // Updated by Ace Rodstin on 11/23/23. // // Copyright (C) Ace Rodstin 2023. All rights reserved. // #include "Library/FileManager.h" vector<path> FileManager::searchFiles(path directory, set<path> extensions) { vector<path> result; auto iterator = directory_iterator(directory); for (auto directoryEntry : iterator) { auto path = directoryEntry.path(); if (is_directory(path)) { auto files = searchFiles(path, extensions); for (auto path: files) { result.push_back(path); } continue; } if (is_regular_file(path)) { auto extension = path.extension(); if (extensions.contains(extension)) { result.push_back(path); } } } return result; }