src/archiver_dir.c
changeset 1054 57f4af811ffb
parent 1053 a277a93ac1aa
child 1098 4e86cec1143f
--- a/src/archiver_dir.c	Mon Feb 15 09:19:38 2010 -0500
+++ b/src/archiver_dir.c	Mon Feb 15 14:02:36 2010 -0500
@@ -243,6 +243,18 @@
 } /* DIR_dirClose */
 
 
+static int DIR_stat(fvoid *opaque, const char *name, int *exists,
+                    PHYSFS_Stat *stat)
+{
+    char *d = __PHYSFS_platformCvtToDependent((char *) opaque, name, NULL);
+    int retval = 0;
+
+    BAIL_IF_MACRO(d == NULL, NULL, 0);
+    retval = __PHYSFS_platformStat(d, exists, stat);
+    allocator.Free(d);
+    return retval;
+} /* DIR_stat */
+
 
 const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_DIR =
 {
@@ -253,7 +265,6 @@
 };
 
 
-
 const PHYSFS_Archiver __PHYSFS_Archiver_DIR =
 {
     &__PHYSFS_ArchiveInfo_DIR,
@@ -276,7 +287,8 @@
     DIR_tell,               /* tell() method           */
     DIR_seek,               /* seek() method           */
     DIR_fileLength,         /* fileLength() method     */
-    DIR_fileClose           /* fileClose() method      */
+    DIR_fileClose,          /* fileClose() method      */
+    DIR_stat                /* stat() method           */
 };
 
 /* end of dir.c ... */