Function physfs_sys::PHYSFS_write[][src]

pub unsafe extern "C" fn PHYSFS_write(
    handle: *mut PHYSFS_File,
    buffer: *const c_void,
    objSize: PHYSFS_uint32,
    objCount: PHYSFS_uint32
) -> PHYSFS_sint64
Expand description

\fn PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle, const void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount) \brief Write data to a PhysicsFS filehandle

The file must be opened for writing.

\deprecated As of PhysicsFS 2.1, use PHYSFS_writeBytes() instead. This function just wraps it anyhow. This function never clarified what would happen if you managed to write a partial object, so working at the byte level makes this cleaner for everyone, especially now that PHYSFS_Io interfaces can be supplied by the application.

\param handle retval from PHYSFS_openWrite() or PHYSFS_openAppend(). \param buffer buffer of bytes to write to (handle). \param objSize size in bytes of objects being written to (handle). \param objCount number of (objSize) objects to write to (handle). \return number of objects written. PHYSFS_getLastErrorCode() can shed light on the reason this might be < (objCount). -1 if complete failure.

\sa PHYSFS_writeBytes