24 #include "directoryScan.hpp" 27 namespace fs = boost::filesystem;
30 const string directoryPath)
32 fs::recursive_directory_iterator dirIterator(directoryPath);
33 fs::recursive_directory_iterator end;
35 vector<string> filePaths;
37 for (fs::path
const &p : boost::make_iterator_range(dirIterator, {}))
39 if (fs::is_directory(p))
46 filePaths.push_back(p.string());
48 const unsigned long filePathsSize = filePaths.size();
49 bool printComma =
false;
59 for (
unsigned int i = 0; i < filePathsSize; i++)
61 string fileName = filePaths[i];
75 cout << endl <<
"]" << endl;
void printResultToStdout(const std::string fileName, const std::pair< string, list< match >> resultPair)
void scanDirectory(const bool json, const string &directoryPath)
void appendToJson(const std::string fileName, const std::pair< string, list< match >> resultPair, bool &printComma)
Holds information about state of one agent.
pair< string, list< match > > processSingleFile(const CopyrightState &state, const string fileName)