MCPcopy Create free account
hub / github.com/TzuHuanTai/RaspberryPi-WebRTC / GetFiles

Method GetFiles

src/common/utils.cpp:155–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155std::vector<std::pair<fs::file_time_type, fs::path>> Utils::GetFiles(const std::string &path,
156 const std::string &extension) {
157 std::vector<std::pair<fs::file_time_type, fs::path>> files;
158 for (const auto &entry : fs::directory_iterator(path)) {
159 if (entry.is_regular_file() && entry.path().extension() == extension) {
160 files.emplace_back(fs::last_write_time(entry), entry.path());
161 }
162 }
163 return files;
164}
165
166std::string Utils::FindLatestSubDir(const std::string &path) {
167 if (!fs::exists(path) || !fs::is_directory(path)) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected