<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License
"Eclipse Public License v1.0" which accompanies this distribution,
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
Nokia Corporation - initial contribution.
Contributors:
-->
<!DOCTYPE task
PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="GUID-7084E973-BF4A-5AA7-9233-4F540BE1ADD7" xml:lang="en"><title>Reading
a Section of a Large File </title><shortdesc>How to read a section of a large file. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
<context id="GUID-BEF7B34C-93C3-484F-9647-4DFBBD0C7B2B"><p>The function <codeph>RFs::ReadFileSection()</codeph> uses
a <xref href="GUID-AAE85115-A8AA-3F6C-BA8C-69F5A23B0D90.dita"><apiname>TInt64</apiname></xref> to specify position an a large file that is beyond
2GB–1. </p><p>See <xref href="GUID-E263C747-946F-35AA-9F1D-41833BD350FC.dita#GUID-E263C747-946F-35AA-9F1D-41833BD350FC/GUID-FBA1027E-7FD0-380A-BD84-654C8642DEC0"><apiname>RFs::ReadFileSection(const TDesC& aName, TInt64
aPos, TDes8& aDes, TInt aLength)</apiname></xref>. </p></context>
<steps id="GUID-1C48BFF9-F92C-573D-B4A8-3CFE8E300D15">
<step id="GUID-1B21F4BD-7D20-5CD9-B295-C1BD06D70B40"><cmd>Replace the <xref href="GUID-7A2A43EC-6125-3BFE-834B-23C37F7B40D5.dita"><apiname>TInt</apiname></xref> variable
with a <xref href="GUID-AAE85115-A8AA-3F6C-BA8C-69F5A23B0D90.dita"><apiname>TInt64</apiname></xref> or specify the position value. </cmd>
<stepxmp><codeblock id="GUID-BFE10A22-8324-5161-BCB9-53D3B1AC0EF0" xml:space="preserve">TFileName filename = _L(“BIGFILE.BIG”);
TBuf<1024> readBuf;
// TInt position = 3000;
TInt64 position = 3000000000;
TInt r = iFs.ReadFileSection(filename, position, readBuf, readBuf.Length());</codeblock> </stepxmp>
</step>
</steps>
</taskbody></task>