Advertisement
Guest User

Files.h

a guest
Jan 17th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #pragma once
  2. #include <string>
  3. #include <fstream>
  4. #include <vector>
  5.  
  6.  
  7. namespace files {
  8.  
  9.  
  10.     namespace types {
  11.  
  12.         using file = std::fstream;
  13.         using infile = std::ifstream;
  14.         using outfile = std::ofstream;
  15.         using file_path = std::string;
  16.         using file_content = std::vector<std::string>;
  17.         using file_line = std::string;
  18.     }
  19.  
  20.  
  21.     types::file_content ReadFile(types::file_path to_read);
  22.  
  23.     bool WriteFile(types::file_path to_write, types::file_content fdata);
  24.  
  25.     bool CreateFile(types::file_path to_create);
  26.  
  27.     bool DeleteFile(types::file_path to_delete);
  28.  
  29.     bool CheckFile(types::file_path to_check);
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement