×
Namespaces

Variants
Actions
(Difference between revisions)

How to use RFileWriteStream

From Nokia Developer Wiki
Jump to: navigation, search
savaj (Talk | contribs)
lpvalente (Talk | contribs)

Revision as of 15:53, 2 April 2009

File:More work needed.gif

Following article shows how to use RFileWriteStream to write stream to a file.

Headers Require:

#include <s32file.h> //RFileWriteStream 
#include <f32file.h> //RFs

Library needed:

LIBRARY  estor.lib //RFileWriteStream 
LIBRARY efsrv.lib //RFs

Source:

TInt16 someInt;
RFileWriteStream writerStream;
writerStream.PushL(); // writerStream on cleanup stack
User::LeaveIfError(writerStream.Create(fs, fileName, EFileWrite)); //fs is ur file session and fileName is name of ur file.
writerStream.WriteInt16L(someInt);
writerStream.CommitL();
writerStream.Pop(); // writerStream
writerStream.Release();

Related Links:

85 page views in the last 30 days.
×