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.

25 lines
556 B

преди 4 години
преди 4 години
преди 4 години
  1. #pragma once
  2. #include <cstddef>
  3. #include <atomic>
  4. namespace gp {
  5. template<typename> class buffer;
  6. class file_description {
  7. std::atomic_int64_t ref_counter;
  8. public:
  9. virtual void read() = 0;
  10. virtual void write() = 0;
  11. virtual void set_attr() = 0;
  12. virtual void get_attr() = 0;
  13. virtual void seek() = 0;
  14. virtual void close() = 0;
  15. static file_description* open(class system&, gp::buffer<std::byte>);
  16. static file_description* create(class system&, gp::buffer<std::byte>);
  17. static file_description* remove(class system&, gp::buffer<std::byte>);
  18. };
  19. }