-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhead.hpp
More file actions
executable file
·62 lines (50 loc) · 1.52 KB
/
head.hpp
File metadata and controls
executable file
·62 lines (50 loc) · 1.52 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//head file
#ifndef HEAD_HPP
#define HEAD_HPP
#include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <filesystem>
#include <algorithm>
// 1. DATA STRUCTURES
struct fileStructure {
std::string name;
long long byte_size;
};
// -----------------------------------------------------------------
// 2. CLASS DECLARATIONS (Interface Only)
// -----------------------------------------------------------------
class analyzer {
private:
std::vector<fileStructure> files;
public:
// Core Data Management
void populate_data(const std::string& path = ".");
void reportData();
// Analysis and Manipulation
long long sortFileOnByte(bool x); // Note: Should probably return void, or the max byte size.
void minMax();
void sortFileOnName();
void searchfile(const std::string& fname);
void searchfile(); // Interactive wrapper
// Utility
void lineCount(const std::string& filepath);
void lineCount(); // Interactive wrapper
};
class cliManager {
public:
/**
* @brief Runs the continuous interactive loop.
* @param a Reference to the analyzer object to execute commands on.
*/
void runterminal(analyzer &a);
};
// -----------------------------------------------------------------
// 3. UTILITY FUNCTION DECLARATIONS
// -----------------------------------------------------------------
/**
* @brief Prints the tool's main banner/header.
*/
void printBanner();
#endif // HEAD_HPP