MCPcopy Create free account
hub / github.com/catboost/catboost / FlushData

Method FlushData

util/system/file.cpp:504–517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502}
503
504bool TFileHandle::FlushData() noexcept {
505#if defined(_linux_)
506 if (!IsOpen()) {
507 return false;
508 }
509
510 int ret = ::fdatasync(Fd_);
511
512 // Same loginc in error handling as for fsync above.
513 return ret == 0 || errno == EROFS || errno == EINVAL;
514#else
515 return Flush();
516#endif
517}
518
519i32 TFileHandle::Read(void* buffer, ui32 byteCount) noexcept {
520 // FIXME size and return must be 64-bit

Callers 7

TestReadMethod · 0.45
Y_UNIT_TESTFunction · 0.45
FlushDataMethod · 0.45
TestFlushMethod · 0.45
TestFlushSpecialFileMethod · 0.45
DoFlushMethod · 0.45
ForInputMethod · 0.45

Calls 1

FlushFunction · 0.50

Tested by 3

TestReadMethod · 0.36
TestFlushMethod · 0.36
TestFlushSpecialFileMethod · 0.36