Function physfs_sys::PHYSFS_read[][src]

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

\fn PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle, void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount) \brief Read data from a PhysicsFS filehandle

The file must be opened for reading.

\deprecated As of PhysicsFS 2.1, use PHYSFS_readBytes() instead. This function just wraps it anyhow. This function never clarified what would happen if you managed to read 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 handle returned from PHYSFS_openRead(). \param buffer buffer to store read data into. \param objSize size in bytes of objects being read from (handle). \param objCount number of (objSize) objects to read from (handle). \return number of objects read. PHYSFS_getLastErrorCode() can shed light on the reason this might be < (objCount), as can PHYSFS_eof(). -1 if complete failure.

\sa PHYSFS_readBytes \sa PHYSFS_eof