SplFileObject fwrite alternative

Hi,

We have the need to create a csv file with data from sugar. This file is then uploaded to a ftp server. Since the cloud does not allow the SplFileObject->fwrite() or fwrite() method to be used, is there an alternative method to create a file? Maybe as an attachment for a note or something?

Regards,

Stijn