#include <f32file.h>
class RRawDisk : public RSubSessionBase |
Public Member Functions | |
---|---|
IMPORT_C void | Close() |
IMPORT_C TInt | Open(RFs &, TInt) |
IMPORT_C TInt | Read(TInt64, TDes8 &) |
IMPORT_C TInt | Write(TInt64, TDesC8 &) |
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.
IMPORT_C void | Close | ( | ) |
Closes the direct access channel to the disk, and allows other resources to access the disk.
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.
Parameter | Description |
---|---|
aFs | The file server session. |
aDrive | The drive containing the disk to be accessed. Specify a drive in the range EDriveA to EDriveZ for drives A to Z. |
Returns: KErrNone, if successful; KErrInUse is returned if any resources are currently open on the disk; otherwise one of the other system-wide error codes.
Reads directly from the disk.
The function reads a number of bytes into the specified descriptor from the disk, beginning at the specified position.
Parameter | Description |
---|---|
aPos | The position on the disk at which to begin reading. |
aDes | The descriptor into which data is to be read. On return aDes contains the data read. |
Returns: KErrNone, if successful, otherwise one of the other system-wide error codes.
Writes directly to the disk.
The function writes the contents of the specified descriptor to the disk at position aPos.
Parameter | Description |
---|---|
aPos | The position at which to begin writing. |
aDes | The descriptor containing the data to be written to the disk. |
Returns: KErrNone, if successful, otherwise one of the other system-wide error codes.