Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: f32file.h
Link against: efsrv.lib

Class RFormat

RFormat

Support

Supported from 5.0

Description

Formats a device, one step at a time.

RFormat must first be opened on a device before formatting each track using Next().

There is also an asynchronous version of Next() which, if encapsulated into a suitable active object, can be used to implement a user-interruptible formatting process.

Derivation

RFormatFormats a device, one step at a time
RFsBaseBase class that provides a Close() function for file related clean-up
RSubSessionBaseClient-side handle to a sub-session

Defined in RFormat:
Next(), Open()

Inherited from RFsBase:
Close()

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

See also:


Formatting functions


Open()

TInt Open(RFs& aFs,const TDesC& aName,TUint aFormatMode,TInt& aCount);

Description

Opens a device for formatting. The device may be formatted either high- or low-density.

Devices which support read-only media may not be formatted. This includes the ROM (on drive Z:). All files on the disk must be closed or an error is returned.

Note:

Parameters

RFs& aFs

The file server session. Must be connected.

const TDesC& aName

Descriptor containing a drive letter followed by a colon; specifies the drive containing the device to be formatted.

TUint aFormatMode

The format mode. For information, see the TFormatMode enumeration.

TInt& aCount

On return, contains the number of tracks which remain to be formatted.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


Next()

TInt Next(TInt& aStep);

Description

Executes next format step — synchronous overload.

Parameters

TInt& aStep

The step number. On return, it is decremented to indicate what stage the formatting has reached.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


Next()

void Next(TPckgBuf<TInt>& aStep,TRequestStatus& aStatus);

Description

Executes next format step — asynchronous overload.

Parameters

TPckgBuf<TInt>& aStep

The step number. On return, it is decremented to indicate what stage the formatting has reached.

TRequestStatus& aStatus

Request status. On completion, contains a completion code. KErrNone if successful, otherwise another of the system-wide error codes.