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

Method Sync

src/leveldb/util/env_posix.cc:312–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310 Status Flush() override { return FlushBuffer(); }
311
312 Status Sync() override {
313 // Ensure new files referred to by the manifest are in the filesystem.
314 //
315 // This needs to happen before the manifest file is flushed to disk, to
316 // avoid crashing in a state where the manifest refers to files that are not
317 // yet on disk.
318 Status status = SyncDirIfManifest();
319 if (!status.ok()) {
320 return status;
321 }
322
323 status = FlushBuffer();
324 if (!status.ok()) {
325 return status;
326 }
327
328 return SyncFd(fd_, filename_, false);
329 }
330
331 private:
332 Status FlushBuffer() {

Callers 2

DoWriteStringToFileFunction · 0.45
TESTFunction · 0.45

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.36