platform/unix.c
changeset 28 529214f57d1b
parent 23 bd6ba9c8717c
child 39 bc29e1ee7ef6
equal deleted inserted replaced
27:e1d3292769b2 28:529214f57d1b
   326     closedir(dir);
   326     closedir(dir);
   327     return(retval);
   327     return(retval);
   328 } /* __PHYSFS_platformEnumerateFiles */
   328 } /* __PHYSFS_platformEnumerateFiles */
   329 
   329 
   330 
   330 
       
   331 int __PHYSFS_platformFileLength(FILE *handle)
       
   332 {
       
   333     struct stat statbuf;
       
   334     errno = 0;
       
   335     BAIL_IF_MACRO(fstat(fileno(handle), &statbuf) == -1, strerror(errno), -1);
       
   336     return(statbuf.st_size);
       
   337 } /* __PHYSFS_platformFileLength */
       
   338 
       
   339 
   331 /* end of unix.c ... */
   340 /* end of unix.c ... */
   332 
   341