MCPcopy Create free account
hub / github.com/ElementsProject/elements / Read

Method Read

src/leveldb/util/env_posix.cc:235–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233 }
234
235 Status Read(uint64_t offset, size_t n, Slice* result,
236 char* scratch) const override {
237 if (offset + n > length_) {
238 *result = Slice();
239 return PosixError(filename_, EINVAL);
240 }
241
242 *result = Slice(mmap_base_ + offset, n);
243 return Status::OK();
244 }
245
246 virtual std::string GetName() const override { return filename_; }
247

Callers

nothing calls this directly

Calls 3

PosixErrorFunction · 0.85
OKFunction · 0.85
SliceClass · 0.70

Tested by

no test coverage detected