Symbian3/PDK/Source/GUID-B97C3C1D-7F35-4B0A-9420-180CE70EF6DE.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
parent 12 80ef3a206772
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.

<?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-B97C3C1D-7F35-4B0A-9420-180CE70EF6DE" xml:lang="en"><title>Getting
the Size of a Large File using TEntry</title><shortdesc>Describes how to get the size of a large file through the directory
entry class.</shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
<context id="GUID-770F2977-EA82-4680-A313-612331B0000B"><p><codeph>TEntry::FileSize()</codeph> returns a 64-bit file size. <codeph>TEntry::FileSize()</codeph> replaces
the function <codeph>TEntry::iSize()</codeph> as <codeph>iSize()</codeph> cannot
represent a file size beyond 2GB-1 (if treated as a signed int) or beyond
4GB-1 (if treated as an unsigned int).</p>     <p>Replace calls to <codeph>TEntry::iSize()</codeph> with <codeph>TEntry::FileSize()</codeph> for
large files. </p></context>
<steps id="GUID-4DD07DEC-6017-4237-BE46-1D69E5FBD744-GENID-1-12-1-18-1-1-9-1-6-1-8-1-15-1-3-2">
<step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-12-1-18-1-1-9-1-6-1-8-1-15-1-3-2-1"><cmd>Use <codeph>TEntry::FileSize()</codeph> instead
of <codeph>TEntry::iSize()</codeph> for large files and replace the return
variable of type <codeph>TInt</codeph> with a <codeph>TInt64</codeph>.</cmd>
<stepxmp><codeblock xml:space="preserve">TInt r;
TEntry myFileEntry;
RFs TheFs;
TFileName myFileName;
...
r = TheFs.Entry(myFileName, myFileEntry);
...
// TInt size = myFileEntry.iSize;
TInt64 size = myFileEntry.FileSize();</codeblock></stepxmp>
</step>
</steps>
</taskbody><related-links>
<link href="GUID-B6F35F05-8EFB-5E88-B14B-C1B2F83E6015.dita"><linktext>Getting the
Size of a Large File Using RFile</linktext></link>
<link href="GUID-EA8974A2-1E8F-4272-880A-183AD1A40371.dita"><linktext>Setting the
File Size of a Large File</linktext></link>
</related-links></task>