File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131#include < fstream>
3232
3333using namespace drogon_ctl ;
34- using drogon::filesystem;
3534
3635static void forEachControllerHeaderIn (
3736 std::string strPath,
@@ -54,20 +53,24 @@ static void forEachControllerHeaderIn(
5453 return ;
5554
5655 std::error_code ec;
57- filesystem::path fsPath (strPath);
58- if (!filesystem::exists (strPath, ec))
56+ drogon:: filesystem::path fsPath (strPath);
57+ if (!drogon:: filesystem::exists (strPath, ec))
5958 {
6059 return ;
6160 }
62- for (auto &itr : filesystem::directory_iterator (fsPath))
61+ for (auto &itr : drogon:: filesystem::directory_iterator (fsPath))
6362 {
64- if (filesystem::is_directory (itr.status ()))
63+ if (drogon:: filesystem::is_directory (itr.status ()))
6564 {
6665 forEachControllerHeaderIn (itr.path ().string (), cb);
6766 }
6867 else
6968 {
70- cb (itr.path ().string ());
69+ auto fileName = itr.path ().string ();
70+ if (fileName.find (" .h" ) == fileName.length () - 2 )
71+ {
72+ cb (fileName);
73+ }
7174 }
7275 }
7376 return ;
You can’t perform that action at this time.
0 commit comments