Tao.PhysFs SDK Documentation

Fs.PHYSFS_fileLength Method 

Get total length of a file in bytes.

[Visual Basic]
Public Shared Function PHYSFS_fileLength( _
   ByVal handle As IntPtr _
) As Long
[C#]
public static long PHYSFS_fileLength(
   IntPtr handle
);

Parameters

handle
handle returned from PHYSFS_open*().

Return Value

size in bytes of the file. -1 if can't be determined.

Remarks

Note that if the file size can't be determined (since the archive is "streamed" or whatnot) than this will 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.

See Also

Fs Class | Tao.PhysFs Namespace | PHYSFS_tell | PHYSFS_seek