×
Namespaces

Variants
Actions

How to use RFileWriteStream

From Nokia Developer Wiki
Jump to: navigation, search

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

Headers required:

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

Library needed:

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

Source:

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

Related Links:

Version Hint

Windows Phone: [[Category:Windows Phone]]
[[Category:Windows Phone 7.5]]
[[Category:Windows Phone 8]]

Nokia Asha: [[Category:Nokia Asha]]
[[Category:Nokia Asha Platform 1.0]]

Series 40: [[Category:Series 40]]
[[Category:Series 40 1st Edition]] [[Category:Series 40 2nd Edition]]
[[Category:Series 40 3rd Edition (initial release)]] [[Category:Series 40 3rd Edition FP1]] [[Category:Series 40 3rd Edition FP2]]
[[Category:Series 40 5th Edition (initial release)]] [[Category:Series 40 5th Edition FP1]]
[[Category:Series 40 6th Edition (initial release)]] [[Category:Series 40 6th Edition FP1]] [[Category:Series 40 Developer Platform 1.0]] [[Category:Series 40 Developer Platform 1.1]] [[Category:Series 40 Developer Platform 2.0]]

Symbian: [[Category:Symbian]]
[[Category:S60 1st Edition]] [[Category:S60 2nd Edition (initial release)]] [[Category:S60 2nd Edition FP1]] [[Category:S60 2nd Edition FP2]] [[Category:S60 2nd Edition FP3]]
[[Category:S60 3rd Edition (initial release)]] [[Category:S60 3rd Edition FP1]] [[Category:S60 3rd Edition FP2]]
[[Category:S60 5th Edition]]
[[Category:Symbian^3]] [[Category:Symbian Anna]] [[Category:Nokia Belle]]

This page was last modified on 30 May 2013, at 07:34.
88 page views in the last 30 days.
×