# PHYSFS_fileLength Get total length of a file in bytes. ## Header File Defined in [](https://github.com/icculus/physfs/blob/main/src/physfs.h) ## Syntax ```c PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_File *handle); ``` ## Function Parameters | | | | | ---------------------------- | ---------- | --------------------------------------------------- | | [PHYSFS_File](PHYSFS_File) * | **handle** | handle returned from [PHYSFS_open](PHYSFS_open)*(). | ## Return Value ([PHYSFS_sint64](PHYSFS_sint64)) Returns size in bytes of the file. -1 if can't be determined. ## Remarks 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. ## Thread Safety Multiple threads can not operate on the same [PHYSFS_File](PHYSFS_File) at the same time, but they can safely operate on _different_ ones simultaneously. ## Version This function is available since PhysicsFS 1.0.0. ## See Also - [PHYSFS_tell](PHYSFS_tell) - [PHYSFS_seek](PHYSFS_seek) ---- [CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction), [CategoryPhysicsFS](CategoryPhysicsFS)