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.

28 lines
601 B

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