|
@@ -1,5 +1,8 @@
|
|
|
#include "../include/FileManager.h"
|
|
|
|
|
|
+#include <boost/filesystem.hpp>
|
|
|
+#include <boost/range/iterator_range.hpp>
|
|
|
+
|
|
|
FileManager::FileManager() {}
|
|
|
|
|
|
FileManager::~FileManager() {
|
|
@@ -83,9 +86,9 @@ std::vector<char> FileManager::readGet() {
|
|
|
std::vector<std::string> FileManager::listFiles() {
|
|
|
std::vector<std::string> res;
|
|
|
// TODO make path configurable
|
|
|
- boost::filesystem::path p{"."};
|
|
|
- for(auto& entry : boost::make_iterator_range(boost::filesystem::directory_iterator(p), {})) {
|
|
|
- if(boost::filesystem::is_directory(entry.path()))
|
|
|
+ for (const auto &entry :
|
|
|
+ boost::filesystem::directory_iterator(this->fileDirectory)) {
|
|
|
+ if (boost::filesystem::is_directory(entry.path()))
|
|
|
continue;
|
|
|
res.push_back(entry.path().string());
|
|
|
}
|