-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.h
More file actions
40 lines (28 loc) · 800 Bytes
/
Directory.h
File metadata and controls
40 lines (28 loc) · 800 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
30
31
32
33
34
35
36
37
38
39
40
//
// Created By Daniel(sisitrs2) 7/9/2018
//
#ifndef MAKEFILE_DIRECTORY_H
#define MAKEFILE_DIRECTORY_H
#include <iostream>
#include <vector>
#include <string>
#include <unordered_set>
#include <memory>
class Directory
{
public:
explicit Directory(const std::string& dir);
const std::vector<std::string>& getCFiles() const;
const std::unordered_set<std::string>& getHeaders() const;
const std::string& getDir() const;
void printFiles() const;
bool doesHExist(const std::string& hfile) const;
private:
std::vector<std::string> _cfiles;
std::unordered_set<std::string> _headers; //filename, filetype
const std::string _dir;
std::string splitFileNameType(std::string& file) const;
void getFiles();
std::string exec(const std::string& cmd) const;
};
#endif //MAKEFILE_DIRECTORY_H