General Purpose library for Freestanding C++ and POSIX systems
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
588 B

пре 4 година
  1. #pragma once
  2. #include "gp/buffer.hpp"
  3. #include "gp/vector.hpp"
  4. #include "gp/vfs/file_description.hpp"
  5. namespace gp{
  6. struct file_char {
  7. // v cannot contain '/' or 0
  8. char v;
  9. };
  10. struct fs_user_representation {
  11. virtual uint32_t to_posix() = 0;
  12. virtual gp::vector<std::byte> to_sid() = 0;
  13. };
  14. class filesystem {
  15. virtual file_description create(gp::buffer<file_char>, fs_user_representation&) = 0;
  16. virtual file_description open(gp::buffer<file_char>, fs_user_representation&) = 0;
  17. virtual file_description remove(gp::buffer<file_char>, fs_user_representation&) = 0;
  18. };
  19. }