\return 0 on error or invalid file type.
| 318 | |
| 319 | /// \return 0 on error or invalid file type. |
| 320 | uintmax_t fileSize(const std::string& file) |
| 321 | { |
| 322 | VSIStatBufL sStat; |
| 323 | if (VSIStatL(file.c_str(), &sStat) == 0) |
| 324 | { |
| 325 | return sStat.st_size; |
| 326 | } |
| 327 | return 0; |
| 328 | } |
| 329 | |
| 330 | |
| 331 | std::string readFileIntoString(const std::string& filename) |