bool hasPage(int pageIndex) => _file == null ? _memory.containsKey(pageIndex) : _offsets.containsKey(pageIndex);