PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ rt_band_get_file_timestamp()

uint64_t rt_band_get_file_timestamp ( rt_band  band)

Return file timestamp.

Only for out-db rasters.

Parameters
band: the band
Returns
file timestamp (Unix time) or 0 in case of error.

Definition at line 608 of file rt_band.c.

608  {
609  VSIStatBufL sStat;
610 
611  assert(NULL != band);
612  if (!band->offline) {
613  rterror("rt_band_get_file_timestamp: Band is not offline");
614  return 0;
615  }
616  /* offline_data is disabled */
617  if (!enable_outdb_rasters) {
618  rterror("rt_band_get_file_timestamp: Access to offline bands disabled");
619  return 0;
620  }
621 
622  if( VSIStatL(band->data.offline.path, &sStat) != 0 ) {
623  rterror("rt_band_get_file_timestamp: Cannot access file");
624  return 0;
625  }
626 
627  return sStat.st_mtime;
628 }
void rterror(const char *fmt,...)
Wrappers used for reporting errors and info.
Definition: rt_context.c:199
band
Definition: ovdump.py:57
char enable_outdb_rasters
Definition: rt_band.c:417

References ovdump::band, enable_outdb_rasters, and rterror().

Referenced by RASTER_getBandFileTimestamp(), and test_band_metadata().

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