Function physfs_sys::PHYSFS_close[][src]

pub unsafe extern "C" fn PHYSFS_close(
    handle: *mut PHYSFS_File
) -> c_int
Expand description

\fn int PHYSFS_close(PHYSFS_File *handle) \brief Close a PhysicsFS filehandle.

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!

\param handle handle returned from PHYSFS_open*(). \return nonzero on success, zero on error. Use PHYSFS_getLastErrorCode() to obtain the specific error.

\sa PHYSFS_openRead \sa PHYSFS_openWrite \sa PHYSFS_openAppend