RDir Class Reference

class RDir : public RSubSessionBase

Reads the entries contained in a directory.

You must first open the directory, specifying an attribute mask which is used by Read() calls to filter the entry types required. Then, use one of the Read() functions to read the filtered entries. When the operation is complete, the directory should be closed using Close()

There are two types of Read(): one works with a single entry at a time, requiring programs to iterate through the entries explicitly. The other works with an entire TEntryArray, allowing multiple entries to be read in one call. As well as making application program logic somewhat simpler, this type uses fewer calls to the server, and is more efficient.

Each type of Read() can be performed either synchronously or asynchronously.

It may be more convenient to use RFs::GetDir() than the Read() calls supported by this class. RFs::GetDir() has the advantage that it allows a directory s entries to be sorted in various ways. However, it does not provide asynchronous as well as synchronous variants and does not allow entries to be read individually.

RFs

Inherits from

Member Functions Documentation

Close()

EFSRV_IMPORT_C voidClose()

Open(RFs &, const TDesC &, const TUidType &)

EFSRV_IMPORT_C TIntOpen(RFs &aFs,
const TDesC &aMatchName,
const TUidType &aUidType
)

Parameters

RFs & aFs
const TDesC & aMatchName
const TUidType & aUidType

Open(RFs &, const TDesC &, TUint)

EFSRV_IMPORT_C TIntOpen(RFs &aFs,
const TDesC &aMatchName,
TUintanAttMask
)

Parameters

RFs & aFs
const TDesC & aMatchName
TUint anAttMask

Read(TEntryArray &)

EFSRV_IMPORT_C TIntRead(TEntryArray &anArray)const

Parameters

TEntryArray & anArray

Read(TEntryArray &, TRequestStatus &)

EFSRV_IMPORT_C voidRead(TEntryArray &anArray,
TRequestStatus &aStatus
)const

Parameters

TEntryArray & anArray
TRequestStatus & aStatus

Read(TEntry &)

EFSRV_IMPORT_C TIntRead(TEntry &anEntry)const

Parameters

TEntry & anEntry

Read(TPckg< TEntry > &, TRequestStatus &)

EFSRV_IMPORT_C voidRead(TPckg< TEntry > &anEntry,
TRequestStatus &aStatus
)const

Parameters

TPckg< TEntry > & anEntry
TRequestStatus & aStatus

SendReceive(TInt, const TIpcArgs &)

TInt SendReceive(TIntaFunction,
const TIpcArgs &aArgs
)const [private]

Sends a message to the server and waits synchronously for a reply.

An opcode specifies the service required. A set of message arguments is passed that can be used to specify client addresses, which the server can use to read from and write to the client address space.

Note that this function will only fail if the server itself fails or environmental errors occur in the server. All requests made using this function are guaranteed to reach the server. This means that all synchronous client requests (typically those that return void) should be routed through this synchronous variant of SendReceive().

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

Parameters

TInt aFunctionThe opcode specifying the requested service.
const TIpcArgs & aArgsThe message arguments.