| 539 | |
| 540 | |
| 541 | void File::Prealloc(int64 Size) |
| 542 | { |
| 543 | #ifdef _WIN_ALL |
| 544 | if (RawSeek(Size,SEEK_SET)) |
| 545 | { |
| 546 | Truncate(); |
| 547 | Seek(0,SEEK_SET); |
| 548 | } |
| 549 | #endif |
| 550 | |
| 551 | #if defined(_UNIX) && defined(USE_FALLOCATE) |
| 552 | // fallocate is rather new call. Only latest kernels support it. |
| 553 | // So we are not using it by default yet. |
| 554 | int fd = GetFD(); |
| 555 | if (fd >= 0) |
| 556 | fallocate(fd, 0, 0, Size); |
| 557 | #endif |
| 558 | } |
| 559 | |
| 560 | |
| 561 | byte File::GetByte() |
no outgoing calls
no test coverage detected