MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / fillDirList

Function fillDirList

source/utils/Helper.cpp:102–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100 }
101
102 bool fillDirList(const std::string& path,
103 std::vector<std::string>& listDir,
104 bool absoluteDir)
105 {
106 const boost::filesystem::path dir_path(path);
107 if (!boost::filesystem::exists(dir_path))
108 return false;
109 boost::filesystem::directory_iterator end_itr;
110 for (boost::filesystem::directory_iterator itr(dir_path); itr != end_itr; ++itr)
111 {
112 if(!boost::filesystem::is_directory(itr->status()))
113 continue;
114
115 if(absoluteDir)
116 listDir.push_back(boost::filesystem::canonical(itr->path()).string());
117 else
118 listDir.push_back(itr->path().filename().string());
119 }
120 return true;
121 }
122
123 bool fillFilesList(const std::string& path,
124 std::vector<std::string>& listFiles,

Callers 2

loadKeeperVoicesMethod · 0.85
readSoundsMethod · 0.85

Calls 1

pathMethod · 0.80

Tested by

no test coverage detected