libimobiledevice  1.3.0
API Documentation - Return to Homepage

◆ afc_file_truncate()

afc_error_t afc_file_truncate ( afc_client_t  client,
uint64_t  handle,
uint64_t  newsize 
)

Sets the size of a file on the device.

Parameters
clientThe client to use to set the file size.
handleFile handle of a previously opened file.
newsizeThe size to set the file to.
Returns
AFC_E_SUCCESS on success or an AFC_E_* error value.
Note
This function is more akin to ftruncate than truncate, and truncate calls would have to open the file before calling this, sadly.