RRawDisk Class Reference

class RRawDisk : public RSubSessionBase

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.

Inherits from

Member Functions Documentation

Close()

IMPORT_C voidClose()

Closes the direct access channel to the disk, and allows other resources to access the disk.

Open(RFs &, TInt)

IMPORT_C TIntOpen(RFs &aFs,
TIntaDrive
)

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.

capability
TCB

Parameters

RFs & aFsThe file server session.
TInt aDriveThe drive containing the disk to be accessed. Specify a drive in the range EDriveA to EDriveZ for drives A to Z.

Read(TInt64, TDes8 &)

IMPORT_C TIntRead(TInt64aPos,
TDes8 &aDes
)

Reads directly from the disk.

The function reads a number of bytes into the specified descriptor from the disk, beginning at the specified position.

panic
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.
capability
TCB

Parameters

TInt64 aPosThe position on the disk at which to begin reading.
TDes8 & aDesThe descriptor into which data is to be read. On return aDes contains the data read.

Write(TInt64, TDesC8 &)

IMPORT_C TIntWrite(TInt64aPos,
TDesC8 &aDes
)

Writes directly to the disk.

The function writes the contents of the specified descriptor to the disk at position aPos.

panic
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.
capability
TCB

Parameters

TInt64 aPosThe position at which to begin writing.
TDesC8 & aDesThe descriptor containing the data to be written to the disk.

Member Data Documentation

TInt iDrive

TInt iDrive[private]