MCPcopy Create free account
hub / github.com/VCVRack/Rack / appendEntries

Function appendEntries

src/system.cpp:69–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67
68
69static void appendEntries(std::vector<std::string>& entries, const fs::path& dir, int depth) {
70 try {
71 for (const auto& entry : fs::directory_iterator(dir)) {
72 entries.push_back(entry.path().generic_u8string());
73 // Recurse if depth > 0 (limited recursion) or depth < 0 (infinite recursion).
74 if (depth != 0) {
75 if (entry.is_directory()) {
76 appendEntries(entries, entry.path(), depth - 1);
77 }
78 }
79 }
80 }
81 catch (fs::filesystem_error& e) {}
82}
83
84
85std::vector<std::string> getEntries(const std::string& dirPath, int depth) {

Callers 1

getEntriesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected