2021-03-14 | Paul Boddie | raw annotate files changeset graph | Added an accessor and opener exposing a memory block containing a loaded file. |
1 #include "block_file_accessor.h" 2 #include "block_file_opener.h" 3 4 /* Return a new accessor for 'fileid'. */ 5 6 Accessor *BlockFileOpener::make_accessor(fileid_t fileid) 7 { 8 FilePaths::iterator found = _paths.find(fileid); 9 10 if (found != _paths.end()) 11 return new BlockFileAccessor(found->second, fileid); 12 else 13 return NULL; 14 } 15 16 // vim: tabstop=4 expandtab shiftwidth=4