physfs.h
changeset 28 529214f57d1b
parent 23 bd6ba9c8717c
child 29 91b45664ec85
--- a/physfs.h	Mon Jul 09 01:45:13 2001 +0000
+++ b/physfs.h	Mon Jul 09 04:15:35 2001 +0000
@@ -791,6 +791,20 @@
  */
 int PHYSFS_seek(PHYSFS_file *handle, int pos);
 
+
+/**
+ * Get total length of a file in bytes. Note that if the file size can't
+ *  be determined (since the archive is "streamed" or whatnot) than this
+ *  with report (-1). Also note that if another process/thread is writing
+ *  to this file at the same time, then the information this function
+ *  supplies could be incorrect before you get it. Use with caution, or
+ *  better yet, don't use at all.
+ *
+ *   @param handle handle returned from PHYSFS_open*().
+ *  @return size in bytes of the file. -1 if can't be determined.
+ */
+int PHYSFS_fileLength(PHYSFS_file *handle);
+
 #ifdef __cplusplus
 }
 #endif