How to write file in Symbian

At first you have to include


Which links against efsrv.lib

Then try the code snippet

RFs fSession;
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"));

Now find your file in this location:


If you unable to find it as I didn’t can search whole C drive for the location.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s