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

Method NewAppendableFile

src/leveldb/util/env_posix.cc:571–582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

569 }
570
571 Status NewAppendableFile(const std::string& filename,
572 WritableFile** result) override {
573 int fd = ::open(filename.c_str(),
574 O_APPEND | O_WRONLY | O_CREAT | kOpenBaseFlags, 0644);
575 if (fd < 0) {
576 *result = nullptr;
577 return PosixError(filename, errno);
578 }
579
580 *result = new PosixWritableFile(filename, fd);
581 return Status::OK();
582 }
583
584 bool FileExists(const std::string& filename) override {
585 return ::access(filename.c_str(), F_OK) == 0;

Callers

nothing calls this directly

Calls 2

PosixErrorFunction · 0.85
OKFunction · 0.85

Tested by

no test coverage detected