I obtained this answer in PsOC developer:
Where do you want to write the data to? EEPROM or back in the computer?
You cannot create a file from PSoC itself.
If you want use the data for some calculation etc, you can write the data to a temporary buffer (malloc).
If you want it to be in non-volatile you can write the data to EEPROM.
If you want to send it back to the PC, you need to have some kind of communication from PSoC to PC - like serial or USB.