PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ rt_band_get_file_size()

uint64_t rt_band_get_file_size ( rt_band  band)

Return file size in bytes.

Only for out-db rasters.

Parameters
band: the band
Returns
file size in bytes or 0 in case of error.

Definition at line 745 of file rt_band.c.

745 {
746 VSIStatBufL sStat;
747
748 assert(NULL != band);
749 if (!band->offline) {
750 rterror("rt_band_get_file_size: Band is not offline");
751 return 0;
752 }
753 /* offline_data is disabled */
755 rterror("rt_band_get_file_size: Access to offline bands disabled");
756 return 0;
757 }
758
759 if( VSIStatL(band->data.offline.path, &sStat) != 0 ) {
760 rterror("rt_band_get_file_size: Cannot access file");
761 return 0;
762 }
763
764 return sStat.st_size;
765}
void rterror(const char *fmt,...) __attribute__((format(printf
Wrappers used for reporting errors and info.
bool enable_outdb_rasters
Definition rt_band.c:576

References enable_outdb_rasters, and rterror().

Referenced by RASTER_getBandFileSize(), and test_band_metadata().

Here is the call graph for this function:
Here is the caller graph for this function: