+// Get the last modified time of an unopened file.
+
+bool
+get_mtime(const char* filename, Timespec* mtime)
+{
+ struct stat file_stat;
+
+ if (stat(filename, &file_stat) < 0)
+ return false;
+#ifdef HAVE_STAT_ST_MTIM
+ mtime->seconds = file_stat.st_mtim.tv_sec;
+ mtime->nanoseconds = file_stat.st_mtim.tv_nsec;
+#else
+ mtime->seconds = file_stat.st_mtime;
+ mtime->nanoseconds = 0;
+#endif
+ return true;
+}
+
+// Class File_read.
+
+// A lock for the File_read static variables.
+static Lock* file_counts_lock = NULL;
+static Initialize_lock file_counts_initialize_lock(&file_counts_lock);
+
+// The File_read static variables.
+unsigned long long File_read::total_mapped_bytes;
+unsigned long long File_read::current_mapped_bytes;
+unsigned long long File_read::maximum_mapped_bytes;
+