Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: f32file.h
Link against: efsrv.lib

Class RRawDisk

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

RRawDiskEnables direct disk access
RSubSessionBaseClient-side handle to a sub-session

Defined in RRawDisk:
Close(), Open(), Read(), Write()

Inherited from RSubSessionBase:
CloseSubSession(), CreateSubSession(), Send(), SendReceive(), SubSessionHandle(), operator=()


Member functions


Open()

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.


Close()

void Close();

Description

Closes the direct access channel to the disk.


Read()

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.


Write()

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.