Tao.PhysFs SDK Documentation

Fs.PHYSFS_close Method 

Close a PhysicsFS filehandle.

[Visual Basic]
Public Shared Function PHYSFS_close( _
   ByVal handle As IntPtr _
) As Integer
[C#]
public static int PHYSFS_close(
   IntPtr handle
);

Parameters

handle
handle returned from PHYSFS_open*().

Return Value

nonzero on success, zero on error. Specifics of the error can be gleaned from PHYSFS_getLastError.

Remarks

This call is capable of failing if the operating system was buffering writes to the physical media, and, now forced to write those changes to physical media, can not store the data for some reason. In such a case, the filehandle stays open. A well-written program should ALWAYS check the return value from the close call in addition to every writing call!

See Also

Fs Class | Tao.PhysFs Namespace | PHYSFS_openRead | PHYSFS_openWrite | PHYSFS_openAppend