2021-01-24 | Paul Boddie | raw annotate files changeset graph | Introduced usage of an opener to obtain a file pager. |
1 #pragma once 2 3 #include "opener.h" 4 5 /* Support for providing access to files. */ 6 7 class TestFileOpener : public Opener 8 { 9 protected: 10 offset_t _file_size; 11 12 /* Configurable methods. */ 13 14 virtual fileid_t get_fileid(const char *path); 15 16 virtual Accessor *make_accessor(fileid_t fileid); 17 18 public: 19 explicit TestFileOpener(Accessing *accessing, Paging *paging, Pages *pages, 20 offset_t file_size=0); 21 }; 22 23 // vim: tabstop=4 expandtab shiftwidth=4