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

Method NewWritableFile

src/leveldb/util/env_posix.cc:558–569  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556 }
557
558 Status NewWritableFile(const std::string& filename,
559 WritableFile** result) override {
560 int fd = ::open(filename.c_str(),
561 O_TRUNC | O_WRONLY | O_CREAT | kOpenBaseFlags, 0644);
562 if (fd < 0) {
563 *result = nullptr;
564 return PosixError(filename, errno);
565 }
566
567 *result = new PosixWritableFile(filename, fd);
568 return Status::OK();
569 }
570
571 Status NewAppendableFile(const std::string& filename,
572 WritableFile** result) override {

Callers

nothing calls this directly

Calls 2

PosixErrorFunction · 0.85
OKFunction · 0.85

Tested by

no test coverage detected