dir_access_flash.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*************************************************/
  2. /* dir_access_psp.h */
  3. /*************************************************/
  4. /* This file is part of: */
  5. /* GODOT ENGINE */
  6. /*************************************************/
  7. /* Source code within this file is: */
  8. /* (c) 2007-2010 Juan Linietsky, Ariel Manzur */
  9. /* All Rights Reserved. */
  10. /*************************************************/
  11. #ifndef DIR_ACCESS_FLASH_H
  12. #define DIR_ACCESS_FLASH_H
  13. #include "core/os/dir_access.h"
  14. #include <sys/types.h>
  15. #include <sys/stat.h>
  16. #include <unistd.h>
  17. #include <dirent.h>
  18. class DirAccessFlash : public DirAccess {
  19. DIR *dir_stream;
  20. String current_dir;
  21. bool _cisdir;
  22. static DirAccess* create_flash();
  23. public:
  24. bool list_dir_begin(); ///< This starts dir listing
  25. String get_next();
  26. bool current_is_dir() const;
  27. void list_dir_end(); ///<
  28. int get_drive_count();
  29. String get_drive(int p_drive);
  30. Error change_dir(String p_dir); ///< can be relative or absolute, return false on success
  31. String get_current_dir(); ///< return current dir location
  32. Error make_dir(String p_dir);
  33. bool file_exists(String p_file);
  34. bool dir_exists(String p_dir);
  35. size_t get_space_left();
  36. uint64_t get_modified_time(String p_file);
  37. Error rename(String p_from, String p_to);
  38. Error remove(String p_name);
  39. static void make_default();
  40. DirAccessFlash();
  41. ~DirAccessFlash();
  42. };
  43. #endif // DIR_ACCESS_PSP_H