src/archiver_dir.c
changeset 1052 f87b0b7cca8e
parent 1016 957c97389257
child 1053 a277a93ac1aa
equal deleted inserted replaced
1051:42fef01c55d6 1052:f87b0b7cca8e
   167     allocator.Free(d);
   167     allocator.Free(d);
   168     return retval;
   168     return retval;
   169 } /* DIR_getLastModTime */
   169 } /* DIR_getLastModTime */
   170 
   170 
   171 
   171 
       
   172 static int DIR_stat(dvoid *opaque, const char *name, PHYSFS_Stat *st)
       
   173 {
       
   174     char *d = __PHYSFS_platformCvtToDependent((char *)opaque, name, NULL);
       
   175     int retval = -1;
       
   176 
       
   177     BAIL_IF_MACRO(d == NULL, NULL, -1);
       
   178 
       
   179     retval = __PHYSFS_platformStat(d, st);
       
   180 
       
   181     allocator.Free(d);
       
   182     return(retval);
       
   183 } /* DIR_stat */
       
   184 
       
   185 
   172 static fvoid *doOpen(dvoid *opaque, const char *name,
   186 static fvoid *doOpen(dvoid *opaque, const char *name,
   173                      void *(*openFunc)(const char *filename),
   187                      void *(*openFunc)(const char *filename),
   174                      int *fileExists)
   188                      int *fileExists)
   175 {
   189 {
   176     char *f = __PHYSFS_platformCvtToDependent((char *) opaque, name, NULL);
   190     char *f = __PHYSFS_platformCvtToDependent((char *) opaque, name, NULL);
   259     &__PHYSFS_ArchiveInfo_DIR,
   273     &__PHYSFS_ArchiveInfo_DIR,
   260     DIR_isArchive,          /* isArchive() method      */
   274     DIR_isArchive,          /* isArchive() method      */
   261     DIR_openArchive,        /* openArchive() method    */
   275     DIR_openArchive,        /* openArchive() method    */
   262     DIR_enumerateFiles,     /* enumerateFiles() method */
   276     DIR_enumerateFiles,     /* enumerateFiles() method */
   263     DIR_exists,             /* exists() method         */
   277     DIR_exists,             /* exists() method         */
       
   278     DIR_stat,               /* stat() method           */
   264     DIR_isDirectory,        /* isDirectory() method    */
   279     DIR_isDirectory,        /* isDirectory() method    */
   265     DIR_isSymLink,          /* isSymLink() method      */
   280     DIR_isSymLink,          /* isSymLink() method      */
   266     DIR_getLastModTime,     /* getLastModTime() method */
   281     DIR_getLastModTime,     /* getLastModTime() method */
   267     DIR_openRead,           /* openRead() method       */
   282     DIR_openRead,           /* openRead() method       */
   268     DIR_openWrite,          /* openWrite() method      */
   283     DIR_openWrite,          /* openWrite() method      */