gxfilesystem.h 870 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef GXFILESYSTEM_H
  2. #define GXFILESYSTEM_H
  3. #include <string>
  4. #include "gxdir.h"
  5. class gxFileSystem{
  6. public:
  7. gxFileSystem();
  8. ~gxFileSystem();
  9. /***** GX INTERFACE *****/
  10. public:
  11. enum{
  12. FILE_TYPE_NONE=0,FILE_TYPE_FILE=1,FILE_TYPE_DIR=2
  13. };
  14. bool createDir( const std::string &dir );
  15. bool deleteDir( const std::string &dir );
  16. bool createFile( const std::string &file );
  17. bool deleteFile( const std::string &file );
  18. bool copyFile( const std::string &src,const std::string &dest );
  19. bool renameFile( const std::string &src,const std::string &dest );
  20. bool setCurrentDir( const std::string &dir );
  21. std::string getCurrentDir()const;
  22. int getFileSize( const std::string &name )const;
  23. int getFileType( const std::string &name )const;
  24. gxDir *openDir( const std::string &name,int flags );
  25. gxDir *verifyDir( gxDir *d );
  26. void closeDir( gxDir *dir );
  27. };
  28. #endif