Location:
f32file.h
Link against: efsrv.lib
RRawDisk
Support
Supported from 5.0
Description
Enables direct disk access. No other resources can access the disk
while direct access to it is in effect.
This class is not intended for user
derivation.
Derivation
RRawDisk | Enables direct disk access |
RSubSessionBase | Client-side handle to a sub-session |
|
Defined in RRawDisk
:
Close()
, Open()
, Read()
, Write()
Inherited from RSubSessionBase
:
CloseSubSession()
,
CreateSubSession()
,
Send()
,
SendReceive()
,
SubSessionHandle()
,
operator=()
TInt Open(RFs& aFs,TInt aDrive);
Description
Opens a direct access channel to the disk. Other resources are
disabled from accessing the disk until Close()
is called.
Note:
Parameters
RFs& aFs |
The file server session |
TInt aDrive |
The drive containing the disk to be accessed. Specify a drive
in the range EDriveA to EDriveZ for drives
A to Z . |
|
Return value
TInt |
KErrNone if successful, otherwise another of the
system-wide error codes.
|
|
void Close();
Description
Closes the direct access channel to the
disk.
TInt Read(TInt aPos,TDes8& aDes);
Description
Reads directly from disk. Reads a number of bytes from the disk
beginning at a specified position into a descriptor.
Parameters
TInt aPos |
The position on the disk at which to begin reading |
TDes8& aDes |
Descriptor into which to read the data. On return, contains the
data read. The number of bytes read is the lesser of the total number of bytes
on the disk minus aPos , and the maximum length of the
descriptor. |
|
Return value
TInt |
KErrNone if successful, otherwise another of the
system-wide error codes.
|
|
TInt Write(TInt aPos,TDesC8& aDes);
Description
Writes directly to disk. Writes the contents of a descriptor to the
disk at position aPos
.
Parameters
TInt aPos |
The position at which to begin writing |
TDesC8& aDes |
Descriptor containing the data to be written to the disk. |
|
Return value
TInt |
KErrNone if successful, otherwise another of the
system-wide error codes.
|
|