#include #include #include #include #include #include "fs.hpp" using namespace std; vector cellar::fs::listdir(string path) { vector result; boost::filesystem::path cwd(path); boost::filesystem::directory_iterator iter_end; for (boost::filesystem::directory_iterator iter_cwd(cwd); iter_cwd != iter_end; ++iter_cwd) { try { string item = iter_cwd->path().filename().native(); result.push_back(item); } catch (const exception& exc) { cout << "fuck" << endl; } } return result; }