2021-04-11 | Paul Boddie | raw annotate files changeset graph | Changed mmap to return the file size, not the populated extent of the region. Introduced a higher-level client library for file access. Adjusted handling of the region state in the file library. Added a test of the higher-level client library. |
1 #pragma once 2 3 #include "opener_resource.h" 4 5 /* Support for providing access to files. */ 6 7 class TestFileOpener : public OpenerResource 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(Pages *pages, offset_t file_size=0); 20 }; 21 22 // vim: tabstop=4 expandtab shiftwidth=4