| 540 | } |
| 541 | |
| 542 | uint64_t CheckedFile::length( OffsetMode omode ) |
| 543 | { |
| 544 | if ( omode == Physical ) |
| 545 | { |
| 546 | if ( readOnly_ ) |
| 547 | { |
| 548 | return physicalLength_; |
| 549 | } |
| 550 | |
| 551 | // Current file position |
| 552 | uint64_t original_pos = lseek64( 0LL, SEEK_CUR ); |
| 553 | |
| 554 | // End file position |
| 555 | uint64_t end_pos = lseek64( 0LL, SEEK_END ); |
| 556 | |
| 557 | // Restore original position |
| 558 | lseek64( original_pos, SEEK_SET ); |
| 559 | |
| 560 | return end_pos; |
| 561 | } |
| 562 | |
| 563 | return logicalLength_; |
| 564 | } |
| 565 | |
| 566 | void CheckedFile::extend( uint64_t newLength, OffsetMode omode ) |
| 567 | { |
no outgoing calls