At first you have to include
#include
Which links against efsrv.lib
Then try the code snippet
RFs fSession; User::LeaveIfError(fSession.Connect()); RFile file; TInt ret = file.Open(fSession, _L("C:\\testFile.txt"), EFileWrite); if (ret) { ret = file.Create(fSession, _L("C:\\testFile.txt"), EFileWrite); } if (!ret) { file.Write(_L8("Write some data")); } file.Close(); fSession.Close();
Now find your file in this location:
C:\S60\devices\S60_3rd_FP2_SDK_v1.1_2\epoc32\winscw\c
If you unable to find it as I didn’t can search whole C drive for the location.