Return file size in bytes.
Only for out-db rasters.
- Parameters
-
- Returns
- file size in bytes or 0 in case of error.
Definition at line 737 of file rt_band.c.
737 {
738 VSIStatBufL sStat;
739
740 assert(NULL != band);
741 if (!
band->offline) {
742 rterror(
"rt_band_get_file_size: Band is not offline");
743 return 0;
744 }
745
747 rterror(
"rt_band_get_file_size: Access to offline bands disabled");
748 return 0;
749 }
750
751 if( VSIStatL(
band->data.offline.path, &sStat) != 0 ) {
752 rterror(
"rt_band_get_file_size: Cannot access file");
753 return 0;
754 }
755
756 return sStat.st_size;
757}
void rterror(const char *fmt,...) __attribute__((format(printf
Wrappers used for reporting errors and info.
bool enable_outdb_rasters
References enable_outdb_rasters, and rterror().
Referenced by RASTER_getBandFileSize(), and test_band_metadata().