Return file timestamp.
Only for out-db rasters.
- Parameters
-
- Returns
- file timestamp (Unix time) or 0 in case of error.
Definition at line 759 of file rt_band.c.
759 {
760 VSIStatBufL sStat;
761
762 assert(NULL != band);
763 if (!
band->offline) {
764 rterror(
"rt_band_get_file_timestamp: Band is not offline");
765 return 0;
766 }
767
769 rterror(
"rt_band_get_file_timestamp: Access to offline bands disabled");
770 return 0;
771 }
772
773 if( VSIStatL(
band->data.offline.path, &sStat) != 0 ) {
774 rterror(
"rt_band_get_file_timestamp: Cannot access file");
775 return 0;
776 }
777
778 return sStat.st_mtime;
779}
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_getBandFileTimestamp(), and test_band_metadata().