file_man.hh 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /********************************************************************** <BR>
  2. This file is part of Crack dot Com's free source code release of
  3. Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
  4. information about compiling & licensing issues visit this URL</a>
  5. <PRE> If that doesn't help, contact Jonathan Clark at
  6. golgotha_source@usa.net (Subject should have "GOLG" in it)
  7. ***********************************************************************/
  8. #ifndef I4_FILE_MAN_HH
  9. #define I4_FILE_MAN_HH
  10. #include "file/file.hh"
  11. #include "init/init.hh"
  12. // see file/file.hh for a description of what each of these functions do
  13. class i4_file_manager_class : public i4_init_class
  14. {
  15. public:
  16. int init_type() { return I4_INIT_TYPE_FILE_MANAGER; }
  17. static i4_file_manager_class *first;
  18. i4_file_manager_class *next;
  19. virtual i4_file_class *open(const i4_const_str &name, w32 flags=I4_READ) { return 0; }
  20. virtual i4_bool unlink(const i4_const_str &name) { return i4_F; }
  21. virtual i4_bool mkdir(const i4_const_str &name) { return i4_F; }
  22. virtual i4_bool get_status(const i4_const_str &filename, i4_file_status_struct &return_stat)
  23. { return i4_F; }
  24. virtual i4_bool get_directory(const i4_const_str &path,
  25. i4_directory_struct &dir_struct,
  26. i4_bool get_status=i4_F,
  27. i4_status_class *status=0) { return i4_F; }
  28. virtual i4_bool split_path(const i4_const_str &name, i4_filename_struct &fn);
  29. virtual i4_str *full_path(const i4_const_str &relative_name) { return 0; }
  30. };
  31. void i4_add_file_manager(i4_file_manager_class *fman, i4_bool add_front);
  32. void i4_remove_file_manger(i4_file_manager_class *fman);
  33. #endif