class RFile64 : public RFile |
Creates and opens a file, and performs all operations on a single open file.
This is equivalent to RFile class. This class is meant for accessing files of size greater than or equal to 2GB also.
These include:
reading from and writing to the file
seeking to a position within the file
locking and unlocking within the file
setting file attributes
Before using any of these services, a connection to a file server session must have been made, and the file must be open.
Opening Files:
use Create() to create and open a new file for writing; an error is returned if it already exists.
use Replace() to open a file for writing, replacing any existing file of the same name if one exists, or creating a new file if one does not exist. Note that if a file exists, its length is reset to zero.
use Temp() to create and open a temporary file with a unique name, for writing and reading.
When opening a file, you must specify the file server session to use for operations with that file. If you do not close the file explicitly, it is closed when the server session associated with it is closed.
Reading and Writing:
There are several variants of both Read() and Write(). The basic Read(TDes8& aDes) and Write(const TDesC8& aDes) are supplemented by variants allowing the descriptor length to be overridden, or the seek position of the first byte to be specified, or asynchronous completion, or any combination.
Reading transfers data from a file to a descriptor, and writing transfers data from a descriptor to a file. In all cases, the file data is treated as binary and byte descriptors are used (TDes8, TDesC8).
Private Member Functions | |
---|---|
TInt | Seek(TSeek, TInt &) |
TInt | Size(TInt &) |
EFSRV_IMPORT_C TInt | AdoptFromClient | ( | const RMessage2 & | aMsg, |
TInt | aFsHandleIndex, | |||
TInt | aFileHandleIndex | |||
) |
Allows a server to adopt an already open file from a client. The client's RFs and RFile handles are contained in message slots within aMsg.
Assumes that the client's RFs and RFile handles have been sent to the server using TransferToServer().
This RFile will own it's RFs session so that when the sub-session (RFile) is closed so will the RFs session.
EFSRV_IMPORT_C TInt | AdoptFromCreator | ( | TInt | aFsIndex, |
TInt | aFileHandleIndex | |||
) |
Allows a server to adopt an already open file from a client process. The client's file-server (RFs) and file (RFile) handles are contained in this process's environment data slots.
Assumes that the client's RFs and RFile handles have been sent to the server process using TransferToProcess().
This RFile will own it's RFs session so that when the sub-session (RFile) is closed so will the RFs session.
EFSRV_IMPORT_C TInt | Create | ( | RFs & | aFs, |
const TDesC & | aName, | |||
TUint | aFileMode | |||
) |
Creates and opens a new file for writing.
If the file already exists, an error is returned.
If the resulting path does not exist, then the operation cannot proceed and the function returns an error code.
Notes:
1. To close the file, use Close()
2. It automatically sets the file's archive attribute.
RFs & aFs | The file server session. |
const TDesC & aName | The name of the file. Any path components (i.e. drive letter or directory), which are not specified, are taken from the session path. The file name shall not contain wild cards ('?' or '*' characters) and illegal characters like '<', '>', ':', '"', '/', '|' and ''. Backslash '\' character is allowed only as a path delimiter. The filename containing only white space characters (See TChar::IsSpace()) is also illegal. |
TUint aFileMode | The mode in which the file is opened. The access mode is automatically set to EFileWrite. See TFileMode. |
EFSRV_IMPORT_C TInt | Open | ( | RFs & | aFs, |
const TDesC & | aName, | |||
TUint | aFileMode | |||
) |
Opens an existing file for reading or writing.
If the file does not already exist, an error is returned.
Notes:
1. To close the file, use Close()
2. Attempting to open a file with the read-only attribute using the EFileWrite access mode results in an error.
3. Attempting to open a file which is greater than or equal to 2GByte (2,147,483,648 bytes) will fail with KErrTooBig
4. After a file has been opened, the current write position is set to the start of the file. If necessary, use RFile::Seek() to move to a different position within the file.
RFs & aFs | The file server session. |
const TDesC & aName | The name of the file. Any path components (i.e. drive letter or directory), which are not specified, are taken from the session path.The file name shall not contain wild cards ('?' or '*' characters) and illegal characters like '<', '>', ':', '"', '/', '|' and ''. Backslash '\' character is allowed only as a path delimiter. The filename containing only white space characters (See TChar::IsSpace()) is also illegal. |
TUint aFileMode | The mode in which the file is opened. See TFileMode. |
TInt | Read | ( | TDes8 & | aDes | ) | const [inline] |
Reads from the file at the current position.
This is a synchronous function.
Note that when an attempt is made to read beyond the end of the file, no error is returned. The descriptor's length is set to the number of bytes read into it. Therefore, when reading through a file,the end of file has been reached when the descriptor length, as returned by TDesC8::Length(), is zero.
TDes8 & aDes | Descriptor into which binary data is read. Any existing contents are overwritten. On return, its length is set to the number of bytes read. |
void | Read | ( | TDes8 & | aDes, |
TRequestStatus & | aStatus | |||
) | const [inline] |
Reads from the file at the current position.
This is an asynchronous function.
Note that when an attempt is made to read beyond the end of the file, no error is returned. The descriptor's length is set to the number of bytes read into it. Therefore, when reading through a file,the end of file has been reached when the descriptor length, as returned by TDesC8::Length(), is zero.
TDes8 & aDes | Descriptor into which binary data is read. Any existing contents are overwritten. On return, its length is set to the number of bytes read. NB: this function is asynchronous and the request that it represents may not complete until some time after the call to the function has returned. It is important, therefore, that this descriptor remain valid, or remain in scope, until you have been notified that the request is complete. |
TRequestStatus & aStatus | Request status. On completion contains: KErrNone, if successful, otherwise one of the other system-wide error codes. |
TInt | Read | ( | TDes8 & | aDes, |
TInt | aLength | |||
) | const [inline] |
Reads the specified number of bytes of binary data from the file at the current position.
This is a synchronous function.
Note that when an attempt is made to read beyond the end of the file, no error is returned. The descriptor's length is set to the number of bytes read into it. Therefore, when reading through a file,the end of file has been reached when the descriptor length, as returned by TDesC8::Length(), is zero. Assuming aLength is less than the maximum length of the descriptor, the only circumstance in which Read() can return fewer bytes than requested, is when the end of file is reached or if an error occurs.
TDes8 & aDes | Descriptor into which binary data is read. Any existing contents are overwritten. On return, its length is set to the number of bytes read. |
TInt aLength | The number of bytes to be read from the file into the descriptor. If an attempt is made to read more bytes than the descriptor's maximum length, the function returns KErrOverflow. This value must not be negative, otherwise the function returns KErrArgument. |
void | Read | ( | TDes8 & | aDes, |
TInt | aLength, | |||
TRequestStatus & | aStatus | |||
) | const [inline] |
Reads a specified number of bytes of binary data from the file at the current position.
This is an asynchronous function.
Note that when an attempt is made to read beyond the end of the file, no error is returned. The descriptor's length is set to the number of bytes read into it. Therefore, when reading through a file, the end of file has been reached when the descriptor length, as returned by TDesC8::Length(), is zero. Assuming aLength is less than the maximum length of the descriptor, the only circumstances in which Read() can return fewer bytes than requested is when the end of file is reached or if an error has occurred.
TDes8 & aDes | Descriptor into which binary data is read. Any existing contents are overwritten. On return, its length is set to the number of bytes read. NB: this function is asynchronous and the request that it represents may not complete until some time after the call to the function has returned. It is important, therefore, that this descriptor remain valid, or remain in scope, until you have been notified that the request is complete. |
TInt aLength | The number of bytes to be read from the file into the descriptor. If an attempt is made to read more bytes than the descriptor's maximum length, then the function updates aStatus parameter with KErrOverflow. It must not be negative otherwise the function updates aStatus with KErrArgument. |
TRequestStatus & aStatus | Request status. On completion contains KErrNone if successful, otherwise one of the other system-wide error codes. |
EFSRV_IMPORT_C void | Read | ( | TInt64 | aPos, |
TDes8 & | aDes, | |||
TRequestStatus & | aStatus | |||
) | const |
TInt64 aPos | |
TDes8 & aDes | |
TRequestStatus & aStatus |
EFSRV_IMPORT_C void | Read | ( | TInt64 | aPos, |
TDes8 & | aDes, | |||
TInt | aLength, | |||
TRequestStatus & | aStatus | |||
) | const |
TInt64 aPos | |
TDes8 & aDes | |
TInt aLength | |
TRequestStatus & aStatus |
EFSRV_IMPORT_C void | Read | ( | TUint | aPos, |
TDes8 & | aDes, | |||
TRequestStatus & | aStatus | |||
) | const |
TUint aPos | |
TDes8 & aDes | |
TRequestStatus & aStatus |
EFSRV_IMPORT_C void | Read | ( | TUint | aPos, |
TDes8 & | aDes, | |||
TInt | aLength, | |||
TRequestStatus & | aStatus | |||
) | const |
TUint aPos | |
TDes8 & aDes | |
TInt aLength | |
TRequestStatus & aStatus |
TInt | Read | ( | TInt | aPos, |
TDes8 & | aDes | |||
) | const [inline] |
Reads from the file at the specified offset within the file
This is a synchronous function.
Note that when an attempt is made to read beyond the end of the file, no error is returned. The descriptor's length is set to the number of bytes read into it. Therefore, when reading through a file, the end of file has been reached when the descriptor length, as returned by TDesC8::Length(), is zero.
Note: 1. This function over-rides the base class function RFile::Read and inlines the base class RFile::Read. 2. The difference is that this function can read beyond 2GB - 1 when aPos + length of aDes is beyond 2GB - 1. 3. This function is protected using _F32_STRICT_64_BIT_MIGRATION macro to help migration to 64 bit file addressing. When the macro is defined, this function becomes a private overload and hence use of TInt RFile64::Read(TInt64 aPos,TDes8& aDes) const is recommended.
TInt aPos | Position of first byte to be read. This is an offset from the start of the file. If no position is specified, reading begins at the current file position. If aPos is beyond the end of the file, the function returns a zero length descriptor. |
TDes8 & aDes | The descriptor into which binary data is read. Any existing content is overwritten. On return, its length is set to the number of bytes read. |
void | Read | ( | TInt | aPos, |
TDes8 & | aDes, | |||
TRequestStatus & | aStatus | |||
) | const [inline] |
Reads from the file at the specified offset within the file.
This is an asynchronous function.
Note that when an attempt is made to read beyond the end of the file, no error is returned. The descriptor's length is set to the number of bytes read into it. Therefore, when reading through a file, the end of file has been reached when the descriptor length, as returned by TDesC8::Length(), is zero.
Note: 1. This function over-rides the base class function RFile::Read and inlines the base class RFile::Read. 2. The difference is that this function can read beyond 2GB - 1 when aPos + length of aDes is beyond 2GB - 1. 3. This function is protected using _F32_STRICT_64_BIT_MIGRATION macro to help migration to 64 bit file addressing. When the macro is defined, this function becomes a private overload and hence use of void RFile64::Read(TInt64 aPos,TDes8& aDes,TRequestStatus& aStatus) const is recommended.
TInt aPos | Position of first byte to be read. This is an offset from the start of the file. If no position is specified, reading begins at the current file position. If aPos is beyond the end of the file, the function returns a zero length descriptor. |
TDes8 & aDes | The descriptor into which binary data is read. Any existing content is overwritten. On return, its length is set to the number of bytes read. NB: this function is asynchronous and the request that it represents may not complete until some time after the call to the function has returned. It is important, therefore, that this descriptor remain valid, or remain in scope, until you have been notified that the request is complete. |
TRequestStatus & aStatus | The request status. On completion, contains an error code of KErrNone if successful, otherwise one of the other system-wide error codes. |
TInt | Read | ( | TInt | aPos, |
TDes8 & | aDes, | |||
TInt | aLength | |||
) | const [inline] |
Reads the specified number of bytes of binary data from the file at a specified offset within the file.
This is a synchronous function.
Note that when an attempt is made to read beyond the end of the file, no error is returned. The descriptor's length is set to the number of bytes read into it. Therefore, when reading through a file, the end of file has been reached when the descriptor length, as returned by TDesC8::Length(), is zero. Assuming aLength is less than the maximum length of the descriptor, the only circumstances in which Read() can return fewer bytes than requested is when the end of file is reached or if an error has occurred.
Note: 1. This function over-rides the base class function RFile::Read and inlines the base class RFile::Read. 2. The difference is that this function can read beyond 2GB - 1 when aPos + aLength is beyond 2GB - 1. 3. This function is protected using _F32_STRICT_64_BIT_MIGRATION macro to help migration to 64 bit file addressing. When the macro is defined, this function becomes a private overload and hence use of TInt RFile64::Read(TInt64 aPos,TDes8& aDes,TInt aLength) const is recommended.
TInt aPos | Position of first byte to be read. This is an offset from the start of the file. If no position is specified, reading begins at the current file position. If aPos is beyond the end of the file, the function returns a zero length descriptor. |
TDes8 & aDes | The descriptor into which binary data is read. Any existing contents are overwritten. On return, its length is set to the number of bytes read. |
TInt aLength | The number of bytes to read from the file into the descriptor. If an attempt is made to read more bytes than the descriptor's maximum length, then the function updates aStatus parameter with KErrOverflow. It must not be negative otherwise the function updates aStatus with KErrArgument. |
void | Read | ( | TInt | aPos, |
TDes8 & | aDes, | |||
TInt | aLength, | |||
TRequestStatus & | aStatus | |||
) | const [inline] |
Reads the specified number of bytes of binary data from the file at a specified offset within the file.
This is an asynchronous function.
Note that when an attempt is made to read beyond the end of the file, no error is returned. The descriptor's length is set to the number of bytes read into it. Therefore, when reading through a file, the end of file has been reached when the descriptor length, as returned by TDesC8::Length(), is zero. Assuming aLength is less than the maximum length of the descriptor, the only circumstances in which Read() can return fewer bytes than requested is when the end of file is reached or if an error has occurred.
Note: 1. This function over-rides the base class function RFile::Read and inlines the base class RFile::Read. 2. The difference is that this function can read beyond 2GB - 1 when aPos + aLength is beyond 2GB - 1. 3. This function is protected using _F32_STRICT_64_BIT_MIGRATION macro to help migration to 64 bit file addressing. When the macro is defined, this function becomes a private overload and hence use of void RFile64::Read(TInt64 aPos,TDes8& aDes,TInt aLength,TRequestStatus& aStatus) const is recommended.
TInt aPos | Position of first byte to be read. This is an offset from the start of the file. If no position is specified, reading begins at the current file position. If aPos is beyond the end of the file, the function returns a zero length descriptor. |
TDes8 & aDes | The descriptor into which binary data is read. Any existing contents are overwritten. On return, its length is set to the number of bytes read. NB: this function is asynchronous and the request that it represents may not complete until some time after the call to the function has returned. It is important, therefore, that this descriptor remain valid, or remain in scope, until you have been notified that the request is complete. |
TInt aLength | The number of bytes to read from the file into the descriptor. If an attempt is made to read more bytes than the descriptor's maximum length, then the function returns KErrOverflow. It must not be negative otherwise the function returns KErrArgument. |
TRequestStatus & aStatus | Request status. On completion contains KErrNone if successful, otherwise one of the other system-wide error codes. |
EFSRV_IMPORT_C TInt | Replace | ( | RFs & | aFs, |
const TDesC & | aName, | |||
TUint | aFileMode | |||
) |
Opens a file for writing, replacing the content of any existing file of the same name if it exists, or creating a new file if it does not exist.
If the resulting path exists, then:
the length of an existing file with the same filename is re-set to zero
a new file is created, if no existing file with the same filename can be found.
If the resulting path does not exist, then the operation cannot proceed and the function returns an error code.
Notes:
To close the file, use Close(), defined in the base class RFsBase.
It automatically sets the file's archive attribute.
RFs & aFs | The file server session. |
const TDesC & aName | The name of the file. Any path components (i.e. drive letter or directory), which are not specified, are taken from the session path. The file name shall not contain wild cards ('?' or '*' characters) and illegal characters like '<', '>', ':', '"', '/', '|' and ''. Backslash '\' character is allowed only as a path delimiter. The filename containing only white space characters (See TChar::IsSpace()) is also illegal. |
TUint aFileMode | The mode in which the file is opened. The access mode is automatically set to EFileWrite. See TFileMode. |
TInt | Seek | ( | TSeek | aMode, |
TInt & | aPos | |||
) | const [private] |
Sets the the current file position.
The function can also be used to get the current file position without changing it. The file position is the position at which reading and writing takes place. The start of the file is position zero.
To retrieve the current file position without changing it, specify ESeekCurrent for the seek mode, and zero for the offset.
If the seek mode is ESeekStart, then:
1. the function does not modify the aPos argument,
2. the function returns an error if the offset specified is negative.
If the seek mode is ESeekAddress, an error is returned if:
1. the file is not in ROM,
2. the offset specified is greater than the size of the file.
TSeek aMode | Seek mode. Controls the destination of the seek operation. |
TInt & aPos | Offset from location specified in aMode. Can be negative. On return contains the new file position. If the seek mode is either ESeekCurrent or ESeekEnd and the offset specifies a position before the start of the file or beyond the end of the file, then on return, aPos is set to the new file position (either the start or the end of the file). If the seek mode is ESeekAddress, aPos returns the address of the byte at the specified offset within the file. |
TInt | Size | ( | TInt & | aSize | ) | const [private] |
Gets the current file size.
TInt & aSize | On return, the size of the file in bytes. |
EFSRV_IMPORT_C TInt | Temp | ( | RFs & | aFs, |
const TDesC & | aPath, | |||
TFileName & | aName, | |||
TUint | aFileMode | |||
) |
Creates and opens a temporary file with a unique name for writing and reading.
Notes:
1. To close the file, use Close()
RFs & aFs | The file server session. |
const TDesC & aPath | The directory in which the file is created. |
TFileName & aName | On return, contains the full path and file name of the file. The filename is guaranteed to be unique within the directory specified by aPath. |
TUint aFileMode | The mode in which the file is opened. The access mode is automatically set to EFileWrite. See TFileMode. |
TInt | Write | ( | const TDesC8 & | aDes | ) | [inline] |
Writes to the file at the current offset within the file.
This is a synchronous function.
const TDesC8 & aDes | The descriptor from which binary data is written. The function writes the entire contents of aDes to the file. |
void | Write | ( | const TDesC8 & | aDes, |
TRequestStatus & | aStatus | |||
) | [inline] |
Writes to the file at the current offset within the file.
This is an asynchronous function.
const TDesC8 & aDes | The descriptor from which binary data is written. The function writes the entire contents of aDes to the file. NB: this function is asynchronous and the request that it represents may not complete until some time after the call to the function has returned. It is important, therefore, that this descriptor remain valid, or remain in scope, until you have been notified that the request is complete. |
TRequestStatus & aStatus | Request status. On completion contains KErrNone if successful, otherwise one of the other system-wide error codes. |
TInt | Write | ( | const TDesC8 & | aDes, |
TInt | aLength | |||
) | [inline] |
Writes a portion of a descriptor to the file at the current offset within the file.
This is a synchronous function.
void | Write | ( | const TDesC8 & | aDes, |
TInt | aLength, | |||
TRequestStatus & | aStatus | |||
) | [inline] |
Writes a portion of a descriptor to the file at the current offset within the file.
This is an asynchronous function.
const TDesC8 & aDes | The descriptor from which binary data is written. NB: this function is asynchronous and the request that it represents may not complete until some time after the call to the function has returned. It is important, therefore, that this descriptor remain valid, or remain in scope, until you have been notified that the request is complete. |
TInt aLength | The number of bytes to be written from the descriptor. This must not be greater than the length of the descriptor. It must not be negative. |
TRequestStatus & aStatus | Request status. On completion contains KErrNone if successful; KErrArgument if aLength is negative; otherwise one of the other system-wide error codes. |
EFSRV_IMPORT_C void | Write | ( | TInt64 | aPos, |
const TDesC8 & | aDes, | |||
TRequestStatus & | aStatus | |||
) |
TInt64 aPos | |
const TDesC8 & aDes | |
TRequestStatus & aStatus |
EFSRV_IMPORT_C TInt | Write | ( | TInt64 | aPos, |
const TDesC8 & | aDes, | |||
TInt | aLength | |||
) |
EFSRV_IMPORT_C void | Write | ( | TInt64 | aPos, |
const TDesC8 & | aDes, | |||
TInt | aLength, | |||
TRequestStatus & | aStatus | |||
) |
TInt64 aPos | |
const TDesC8 & aDes | |
TInt aLength | |
TRequestStatus & aStatus |
EFSRV_IMPORT_C void | Write | ( | TUint | aPos, |
const TDesC8 & | aDes, | |||
TRequestStatus & | aStatus | |||
) |
TUint aPos | |
const TDesC8 & aDes | |
TRequestStatus & aStatus |
EFSRV_IMPORT_C TInt | Write | ( | TUint | aPos, |
const TDesC8 & | aDes, | |||
TInt | aLength | |||
) |
EFSRV_IMPORT_C void | Write | ( | TUint | aPos, |
const TDesC8 & | aDes, | |||
TInt | aLength, | |||
TRequestStatus & | aStatus | |||
) |
TUint aPos | |
const TDesC8 & aDes | |
TInt aLength | |
TRequestStatus & aStatus |
TInt | Write | ( | TInt | aPos, |
const TDesC8 & | aDes | |||
) | [inline] |
Writes to the file at the specified offset within the file
This is a synchronous function.
Note: 1. This function over-rides the base class function RFile::Write and inlines the base class RFile::Write. 2. The difference is that this function can write beyond 2GB - 1 when aPos + length of aDes is beyond 2GB - 1. 3. This function is protected using _F32_STRICT_64_BIT_MIGRATION macro to help migration to 64 bit file addressing. When the macro is defined, this function becomes a private overload and hence use of TInt RFile64::Write(TInt64 aPos,const TDesC8& aDes) is recommended.
TInt aPos | The offset from the start of the file at which the first byte is written. If a position beyond the end of the file is specified, then the write operation begins at the end of the file. If the position has been locked, then the write fails. |
const TDesC8 & aDes | The descriptor from which binary data is written. The function writes the entire contents of aDes to the file. |
void | Write | ( | TInt | aPos, |
const TDesC8 & | aDes, | |||
TRequestStatus & | aStatus | |||
) | [inline] |
Writes to the file at the specified offset within the file
This is an asynchronous function.
Note: 1. This function over-rides the base class function RFile::Write and inlines the base class RFile::Write. 2. The difference is that this function can write beyond 2GB - 1 when aPos + length of aDes is beyond 2GB - 1. 3. This function is protected using _F32_STRICT_64_BIT_MIGRATION macro to help migration to 64 bit file addressing. When the macro is defined, this function becomes a private overload and hence use of void RFile64::Write(TInt64 aPos,const TDesC8& aDes,TRequestStatus& aStatus) is recommended.
TInt aPos | The offset from the start of the file at which the first byte is written. If a position beyond the end of the file is specified, then the write operation begins at the end of the file. If the position has been locked, then the write fails. |
const TDesC8 & aDes | The descriptor from which binary data is written. The function writes the entire contents of aDes to the file. NB: this function is asynchronous and the request that it represents may not complete until some time after the call to the function has returned. It is important, therefore, that this descriptor remain valid, or remain in scope, until you have been notified that the request is complete. |
TRequestStatus & aStatus | Request status. On completion contains KErrNone if successful, otherwise one of the other system-wide error codes. |
TInt | Write | ( | TInt | aPos, |
const TDesC8 & | aDes, | |||
TInt | aLength | |||
) | [inline] |
Writes the specified number of bytes to the file at the specified offset within the file.
This is a synchronous function.
Note: 1. This function over-rides the base class function RFile::Write and inlines the base class RFile::Write. 2. The difference is that this function can write beyond 2GB - 1 when aPos + aLength is beyond 2GB - 1. 3. This function is protected using _F32_STRICT_64_BIT_MIGRATION macro to help migration to 64 bit file addressing. When the macro is defined, this function becomes a private overload and hence use of TInt RFile64::Write(TInt64 aPos,const TDesC8& aDes,TInt aLength) is recommended.
TInt aPos | The offset from the start of the file at which the first byte is written. If a position beyond the end of the file is specified, then the write operation begins at the end of the file. If the position has been locked, then the write fails. |
const TDesC8 & aDes | The descriptor from which binary data is written. |
TInt aLength | The number of bytes to be written from aDes . It must not be negative. |
void | Write | ( | TInt | aPos, |
const TDesC8 & | aDes, | |||
TInt | aLength, | |||
TRequestStatus & | aStatus | |||
) | [inline] |
Writes the specified number of bytes to the file at the specified offset within the file.
This is an asynchronous function.
Note: 1. This function over-rides the base class function RFile::Write and inlines the base class RFile::Write. 2. The difference is that this function can write beyond 2GB - 1 when aPos + aLength is beyond 2GB - 1. 3. This function is protected using _F32_STRICT_64_BIT_MIGRATION macro to help migration to 64 bit file addressing. When the macro is defined, this function becomes a private overload and hence use of void RFile64::Write(TInt64 aPos,const TDesC8& aDes,TRequestStatus& aStatus) is recommended.
TInt aPos | The offset from the start of the file at which the first byte is written. If a position beyond the end of the file is specified, then the write operation begins at the end of the file. If the position has been locked, then the write fails. |
const TDesC8 & aDes | The descriptor from which binary data is written. NB: this function is asynchronous and the request that it represents may not complete until some time after the call to the function has returned. It is important, therefore, that this descriptor remain valid, or remain in scope, until you have been notified that the request is complete. |
TInt aLength | The number of bytes to be written from aDes. It must not be negative. |
TRequestStatus & aStatus | Request status. On completion contains KErrNone if successful; KErrArgument if aLength is negative; otherwise one of the other system-wide error codes. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.