platform/unix.c
changeset 28 529214f57d1b
parent 23 bd6ba9c8717c
child 39 bc29e1ee7ef6
--- a/platform/unix.c	Mon Jul 09 01:45:13 2001 +0000
+++ b/platform/unix.c	Mon Jul 09 04:15:35 2001 +0000
@@ -328,5 +328,14 @@
 } /* __PHYSFS_platformEnumerateFiles */
 
 
+int __PHYSFS_platformFileLength(FILE *handle)
+{
+    struct stat statbuf;
+    errno = 0;
+    BAIL_IF_MACRO(fstat(fileno(handle), &statbuf) == -1, strerror(errno), -1);
+    return(statbuf.st_size);
+} /* __PHYSFS_platformFileLength */
+
+
 /* end of unix.c ... */