| 62 | *****************************************************************************/ |
| 63 | |
| 64 | size_t File::size() const |
| 65 | { |
| 66 | size_t fileSize = 0U; |
| 67 | size_t currPos = ftell(m_fd); |
| 68 | |
| 69 | if (0 == fseek(m_fd, 0, SEEK_END)) |
| 70 | { |
| 71 | long pos = ftell(m_fd); |
| 72 | |
| 73 | if (0 <= pos) |
| 74 | { |
| 75 | fileSize = pos; |
| 76 | } |
| 77 | |
| 78 | (void)fseek(m_fd, currPos, SEEK_SET); |
| 79 | } |
| 80 | |
| 81 | return fileSize; |
| 82 | } |
| 83 | |
| 84 | /****************************************************************************** |
| 85 | * Protected Methods |
no outgoing calls
no test coverage detected