#include <f32file.h>
Link against:
efsrv.lib
class RRawDisk : public RSubSessionBase;
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
Members
Defined in RRawDisk
:
Close()
Closes the direct access channel to the disk, and allows other resources to access the disk
Open()
Opens a direct access channel to the disk
Read()
Reads directly from the disk
Write()
Writes directly to the disk
Inherited from RSubSessionBase
:
Member functions
IMPORT_C 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 that if any resources are currently open on the disk, an error is returned.
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; KErrInUse is returned if any resources are currently open on the disk; otherwise one of the other
system-wide error codes.
|
|
IMPORT_C void Close();
Description
Closes the direct access channel to the disk, and allows other resources to access the disk.
IMPORT_C TInt Read(TInt64 aPos, TDes8 &aDes);
Description
Reads directly from the disk.
The function reads a number of bytes into the specified descriptor from the disk, beginning at the specified position.
Parameters
TInt64 aPos |
The position on the disk at which to begin reading.
|
TDes8 &aDes |
The descriptor into which data is to be read. On return aDes contains the data read.
|
|
Return value
TInt
|
KErrNone, if successful, otherwise one of the other system-wide error codes.
|
|
Panic codes
User |
In debug builds, the media driver panics if aPos is larger than the size of the physical media or if the end address, given
by aPos + the maximum length of the descriptor, is greater than the size of the physical media.
|
|
IMPORT_C TInt Write(TInt64 aPos, TDesC8 &aDes);
Description
Writes directly to the disk.
The function writes the contents of the specified descriptor to the disk at position aPos.
Parameters
TInt64 aPos |
The position at which to begin writing.
|
TDesC8 &aDes |
The descriptor containing the data to be written to the disk.
|
|
Return value
TInt
|
KErrNone, if successful, otherwise one of the other system-wide error codes.
|
|
Panic codes
User |
In debug builds, the media driver panics if aPos is larger than the size of the physical media or if the end address, given
by aPos + the maximum length of the descriptor, is greater than the size of the physical media.
|
|