General Purpose library for Freestanding C++ and POSIX systems
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

23 行
585 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. }