Pair for FallocateNoResize
| 460 | |
| 461 | // Pair for FallocateNoResize |
| 462 | bool TFileHandle::ShrinkToFit() noexcept { |
| 463 | if (!IsOpen()) { |
| 464 | return false; |
| 465 | } |
| 466 | #if defined(_linux_) && (!defined(_android_) || __ANDROID_API__ >= 21) |
| 467 | return !ftruncate(Fd_, (off_t)GetLength()); |
| 468 | #else |
| 469 | return true; |
| 470 | #endif |
| 471 | } |
| 472 | |
| 473 | bool TFileHandle::Flush() noexcept { |
| 474 | if (!IsOpen()) { |
no test coverage detected