Hi!
I am trying to write data to a file using RFile. However, whenever the program is executed on the emulator, it crashes as soon as the file is to be opened. Does anyone have any experiences with RFile?
RFs aFs;
RFile aFile;
_LIT(KFilename,"test.txt"😉; // Filename
_LIT8(KText,"Hello1"😉; // String to write into file test.txt
TInt err = aFile.Open(aFs, KFilename, EFileShareAny); // try to open file
if (err == KErrNotFound) // if file does not exist - create it
{
err = aFile.Create(aFs, KFilename, EFileShareAny);
}
err = aFile.Write(KText); // write String to file
aFile.Close(); // closing File
Thanks a lot in advance...
Maniac