+FcFileCacheValid (const FcChar8 *cache_file)
+{
+ FcChar8 *dir = FcStrDirname (cache_file);
+ struct stat file_stat, dir_stat;
+
+ if (!dir)
+ return FcFalse;
+ if (stat ((char *) dir, &dir_stat) < 0)
+ {
+ FcStrFree (dir);
+ return FcFalse;
+ }
+ FcStrFree (dir);
+ if (stat ((char *) cache_file, &file_stat) < 0)
+ return FcFalse;
+ /*
+ * If the directory has been modified more recently than
+ * the cache file, the cache is not valid
+ */
+ if (dir_stat.st_mtime - file_stat.st_mtime > 0)
+ return FcFalse;
+ return FcTrue;
+}
+
+FcBool
+FcFileCacheReadDir (FcFontSet *set, FcStrSet *dirs, const FcChar8 *cache_file)