×
Namespaces

Variants
Actions

How to use RFileReadStream

From Nokia Developer Wiki
Jump to: navigation, search

This article shows how to use RFileReadStream to read a stream from file.

Headers required:

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

Library needed:

LIBRARY estor.lib //RFileReadStream
LIBRARY efsrv.lib //RFs

Source:

TInt16 someInt;
RFileReadStream streamReader;
 
// streamReader on cleanup stack
streamReader.PushL();
 
// fs is your file session and fileName is name of your file.
User::LeaveIfError(streamReader.Open(fs, fileName, EFileRead));
 
// read it
someInt = streamReader.ReadInt16L();
 
 
// free streamReader
CleanupStack::PopAndDestroy();

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.
45 page views in the last 30 days.