| 570 | |
| 571 | |
| 572 | off_t Foam::fileSize(const fileName& name, const bool followLink) |
| 573 | { |
| 574 | if (POSIX::debug) |
| 575 | { |
| 576 | Pout<< FUNCTION_NAME << " : name:" << name << endl; |
| 577 | if ((POSIX::debug & 2) && !Pstream::master()) |
| 578 | { |
| 579 | error::printStack(Pout); |
| 580 | } |
| 581 | } |
| 582 | fileStat fileStatus(name, followLink); |
| 583 | if (fileStatus.isValid()) |
| 584 | { |
| 585 | return fileStatus.status().st_size; |
| 586 | } |
| 587 | else |
| 588 | { |
| 589 | return -1; |
| 590 | } |
| 591 | } |
| 592 | |
| 593 | |
| 594 | time_t Foam::lastModified(const fileName& name, const bool followLink) |
no test coverage detected