-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalgorithm.h
More file actions
27 lines (26 loc) · 805 Bytes
/
algorithm.h
File metadata and controls
27 lines (26 loc) · 805 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
#include <string>
#include <vector>
#include <dirent.h>
#include <sys/stat.h>
//#include <filesystem>
class Algorithm{
public:
Algorithm(std::string path);
std::string return_path_of_search(std::string path);
int number_of_files();
int number_of_folder();
int size_on_disk();
std::string last_modified();
std::string file_type();
static bool is_a_folder(std::string path);
//Works with newer version of g++ compiler (version > 8.3.0 in ubuntu)
static std::string breadth_first_search_whole(std::string file_name, std::string path_name);
private:
std::string _path;
std::string name;
int size;
std::string date_last_modified;
std::vector<std::string> number_files;
std::vector<std::string> number_folder;
void update_file_size();
};