This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

fsysclass.h

By: iwishiknew on May 31st, 2013  |  syntax: C++  |  size: 0.95 KB  |  views: 69  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #ifndef FSYS_CLASS_H_INCLUDED
  2. #define FSYS_CLASS_H_INCLUDED
  3. #include <string>
  4. #include <vector>
  5. using namespace std;
  6.  
  7. //return value for errors on the operation
  8. #define FSYS_ERROR 1
  9. #define FSYS_FAILURE 2
  10.  
  11.  
  12. class fsys_class{
  13. public:
  14.    
  15.     fsys_class(const char*);
  16.     fsys_class(const string&);
  17.     fsys_class();
  18.    
  19.     ~fsys_class();
  20.    
  21.     string gpath();
  22.     string gfilename();
  23.    
  24.     //functions
  25.     bool is_file();
  26.     bool is_folder();
  27.    
  28.     int move_to(const string&);
  29.     int copy_to(const string&);
  30.     int del();
  31.     int create(const string&); //only for folders
  32.     int rename(const string&);
  33.    
  34.     //folder only functions
  35.     vector<string> sub_stuff();
  36.    
  37.     //------------------------
  38.     //variables
  39.     bool use_system; //in case of copy/delete/create fail, it will use a command line command if this is true
  40.    
  41.    
  42. private:
  43.    
  44.     string path;
  45.    
  46. };
  47.  
  48.  
  49. #endif // FSYS_CLASS_H_INCLUDED
clone this paste RAW Paste Data