Advertisement
iwishiknew

fsysclass.h

May 31st, 2013
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.95 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement