-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPathHandling.h
More file actions
29 lines (22 loc) · 785 Bytes
/
PathHandling.h
File metadata and controls
29 lines (22 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef PATHHANDLING_H
#define PATHHANDLING_H
#include "Headers.h"
using namespace std;
//using recursive_directory_iterator = boost::filesystem::recursive_directory_iterator; // mac
using recursive_directory_iterator = std::experimental::filesystem::recursive_directory_iterator; // WINDOWS
// Defining the PathHandling class
class PathHandling
{
private:
string current_path; // path storing the files on which searching is to be done
bool path_is_valid; // true if path given by the user is valid
public:
map<int, string> files_index; // indexing of the files
PathHandling();
~PathHandling();
bool setCurrentPath(string path);
void buildFilesIndex();
bool checkPathValidity(string path);
void printFilesIndex();
};
#endif