General Purpose library for Freestanding C++ and POSIX systems
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

23 řádky
588 B

  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. }