13 #include "directoryScan.hpp"
16 namespace fs = boost::filesystem;
19 const string directoryPath)
21 fs::recursive_directory_iterator dirIterator(directoryPath);
22 fs::recursive_directory_iterator end;
24 vector<string> filePaths;
26 for (fs::path
const &p : boost::make_iterator_range(dirIterator, {}))
28 if (fs::is_directory(p))
35 filePaths.push_back(p.string());
37 const unsigned long filePathsSize = filePaths.size();
38 bool printComma =
false;
48 for (
unsigned int i = 0; i < filePathsSize; i++)
50 string fileName = filePaths[i];
64 cout << endl <<
"]" << endl;
void printResultToStdout(const std::vector< tuple< string, string, bool >> &resultPair, const std::string &fileName)
void appendToJson(const std::vector< tuple< string, string, bool >> &resultPair, const std::string &fileName, bool &printComma)
Holds information about state of one agent.
pair< string, list< match > > processSingleFile(const CopyrightState &state, const string fileName)
void scanDirectory(const bool json, const string &directoryPath)