×
Namespaces

Variants
Actions
(Difference between revisions)

How to use RFileWriteStream

From Nokia Developer Wiki
Jump to: navigation, search
lpvalente (Talk | contribs)
m
savaj (Talk | contribs)
Line 1: Line 1:
 
[[Image:More_work_needed.gif]]
 
[[Image:More_work_needed.gif]]
  
 +
Following article shows how to use RFileWriteStream to write stream to a file.
  
 +
'''Headers Require:'''
 +
<code cpp>
 +
#include <s32file.h> //RFileWriteStream
 +
#include <f32file.h> //RFs
 +
</code>
 +
 +
'''Library needed:'''
 +
<code cpp>
 +
LIBRARY  estor.lib //RFileWriteStream
 +
LIBRARY  efsrv.lib //RFs
 +
</code>
 +
 +
'''Source:'''
 
<code cpp>
 
<code cpp>
 
TInt16 someInt;
 
TInt16 someInt;
Line 12: Line 26:
 
writerStream.Release();
 
writerStream.Release();
 
</code>
 
</code>
 +
 +
==Related Links:==
 +
* [[How to use RFileReadStream]]
  
 
[[Category:Symbian C++]]
 
[[Category:Symbian C++]]

Revision as of 23:23, 31 March 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:

58 page views in the last 30 days.
×