save_to_callback


Description:

public bool save_to_callback (AttachmentSaveFunc save_func) throws Error

Saves this by feeding the produced data to save_func.

Can be used when you want to store the attachment to something other than a file, such as an in-memory buffer or a socket. If error is set, false will be returned. Possible errors include those in the FileError domain and whatever the save function generates.

Parameters:

this

A Attachment.

save_func

a function that is called to save each block of data that the save routine generates.

user_data

user data to pass to the save function.

Returns:

true, if the save successfully completed