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.
Public Member Functions | |
---|---|
EFSRV_IMPORT_C void | Close() |
EFSRV_IMPORT_C TInt | Open(RFs &, const TDesC &, const TUidType &) |
EFSRV_IMPORT_C TInt | Open(RFs &, const TDesC &, TUint) |
EFSRV_IMPORT_C TInt | Read(TEntryArray &) |
EFSRV_IMPORT_C void | Read(TEntryArray &, TRequestStatus &) |
EFSRV_IMPORT_C TInt | Read(TEntry &) |
EFSRV_IMPORT_C void | Read(TPckg< TEntry > &, TRequestStatus &) |
Private Member Functions | |
---|---|
TInt | SendReceive(TInt, const TIpcArgs &) |
EFSRV_IMPORT_C TInt | Open | ( | RFs & | aFs, |
const TDesC & | aMatchName, | |||
const TUidType & | aUidType | |||
) |
EFSRV_IMPORT_C TInt | Open | ( | RFs & | aFs, |
const TDesC & | aMatchName, | |||
TUint | anAttMask | |||
) |
EFSRV_IMPORT_C TInt | Read | ( | TEntryArray & | anArray | ) | const |
TEntryArray & anArray |
EFSRV_IMPORT_C void | Read | ( | TEntryArray & | anArray, |
TRequestStatus & | aStatus | |||
) | const |
TEntryArray & anArray | |
TRequestStatus & aStatus |
EFSRV_IMPORT_C void | Read | ( | TPckg< TEntry > & | anEntry, |
TRequestStatus & | aStatus | |||
) | const |
TPckg< TEntry > & anEntry | |
TRequestStatus & aStatus |
TInt | SendReceive | ( | TInt | aFunction, |
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.