RFs is the File Server session.
If you want to use it in console code, you have to create such variable and Connect it
Code:
RFs fs;
fs.Connect();
... use it here ...
fs.Close();
of course leave-safety and error-handling can be added, just to make it less readable:
Code:
RFs fs;
User::LeaveIfError(fs.Connect());
CleanupClosePushL(fs);
... use it here ...
CleanupStack::PopAndDestroy(); // fs
However if you are using GUI code, you already have an always available RFs
Code:
RFs &fs=CCoeEnv::Static()->FsSession();
, or you can simply write CCoeEnv::Static()->FsSession() directly to the place where you need the RFs variable.