Advertisement
RollTime

FileVar.h

Jan 23rd, 2021
1,016
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. #include <iostream>
  2. #include <filesystem>
  3. #include <cstdlib>
  4. #include <fstream>
  5. #include <vector>
  6. #include <algorithm>
  7. using namespace std;
  8. namespace fs=filesystem;
  9.  
  10. #ifndef _FileVar_
  11. #define _FileVar_
  12.  
  13. class FileVar{
  14. private:
  15.     string type;
  16.     fs::path my_path;
  17.     fs::path root_dir;
  18.     fs::path get_good_path();
  19.  
  20. public:    
  21.     FileVar();
  22.     FileVar(int, fs::path);
  23.     FileVar(string, fs::path);
  24.     FileVar(fs::path);
  25.    
  26.     ~FileVar();
  27.    
  28.     bool delete_var();
  29.    
  30.     string get_string();
  31.     int get_int();
  32.     fs::path get_path();
  33.    
  34.     friend ostream& operator<< (ostream&, FileVar&);
  35. };
  36.  
  37. #endif
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement