diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-A7C26FE4-54B2-58D6-9FDF-4B0A565D00DE.dita --- a/Symbian3/PDK/Source/GUID-A7C26FE4-54B2-58D6-9FDF-4B0A565D00DE.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-A7C26FE4-54B2-58D6-9FDF-4B0A565D00DE.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,65 +1,65 @@ - - - - - -Seeking -a Position in a Large File How to seek a particular position in a large file. -

The function RFile64::Seek() is the 64-bit -version of RFile::Seek(). The Seek() function -can modify the file pointer to point to any position addressable by the aPos parameter.

See RFile64::Seek(TSeek -aMode, TInt64& aPos).

To get the current position of -the file pointer, use the TSeek mode ESeekCurrent. -The function updates the output parameter with the new file pointer position -in 64-bits.

Different modes of operation can be specified. These modes -are defined by TSeek.

- -Use TInt64 instead -of TInt for the offset from the location specified in aMode. -// Remove TInt filePosition = 0; -TInt64 filePosition = 0; - -To retrieve the -current position of the file pointer in a large file use RFile::Seek64() with -the mode ESeekCurrent. -TInt64 filePosition = 0; -// Remove r = file.Seek(ESeekCurrent, filePosition); -r = file.Seek64(ESeekCurrent, filePosition); - -To set the file -pointer to a particular position within a large file use RFile::Seek64() with -the seek mode ESeekStart and a seek position value that -is of type TInt64. -TInt64 seekPos = 3000000000; -// Remove r = file.Seek(ESeekStart, seekPos); -r = file.Seek64(ESeekStart, seekPos); - - -Seek position example

If a large file seek is required, -use RFile64::Seek() instead of RFile::Seek() and -use a TInt64 value to specify the location.

// RFile file; - RFile64 file; - TInt err = file.Open(TheFs, _L(“BIGFILE.BIG”), EFileWrite); - if(err != KErrNone) - { - // unrelated error - return err; - } - - // Large file access is now supported! - // TInt seekPos = 0; - Tint64 seekPos = 0; - - // Seek the current position. This can be greater than 2GB. - err = file.Seek(ESeekEnd, seekPos); - if(err != KErrNone) - { - return err; - }
+ + + + + +Seeking +a Position in a Large File How to seek a particular position in a large file. +

The function RFile64::Seek() is the 64-bit +version of RFile::Seek(). The Seek() function +can modify the file pointer to point to any position addressable by the aPos parameter.

See RFile64::Seek(TSeek +aMode, TInt64& aPos).

To get the current position of +the file pointer, use the TSeek mode ESeekCurrent. +The function updates the output parameter with the new file pointer position +in 64-bits.

Different modes of operation can be specified. These modes +are defined by TSeek.

+ +Use TInt64 instead +of TInt for the offset from the location specified in aMode. +// Remove TInt filePosition = 0; +TInt64 filePosition = 0; + +To retrieve the +current position of the file pointer in a large file use RFile::Seek64() with +the mode ESeekCurrent. +TInt64 filePosition = 0; +// Remove r = file.Seek(ESeekCurrent, filePosition); +r = file.Seek64(ESeekCurrent, filePosition); + +To set the file +pointer to a particular position within a large file use RFile::Seek64() with +the seek mode ESeekStart and a seek position value that +is of type TInt64. +TInt64 seekPos = 3000000000; +// Remove r = file.Seek(ESeekStart, seekPos); +r = file.Seek64(ESeekStart, seekPos); + + +Seek position example

If a large file seek is required, +use RFile64::Seek() instead of RFile::Seek() and +use a TInt64 value to specify the location.

// RFile file; + RFile64 file; + TInt err = file.Open(TheFs, _L(“BIGFILE.BIG”), EFileWrite); + if(err != KErrNone) + { + // unrelated error + return err; + } + + // Large file access is now supported! + // TInt seekPos = 0; + Tint64 seekPos = 0; + + // Seek the current position. This can be greater than 2GB. + err = file.Seek(ESeekEnd, seekPos); + if(err != KErrNone) + { + return err; + }
\ No newline at end of file