Location:
f32file.h
Link against: efsrv.lib
RDir
Supported from 5.0
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()
, defined in the base class RFsBase
.
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.
|
Defined in RDir
:
Open()
, Read()
Inherited from RFsBase
:
Close()
Inherited from RSubSessionBase
:
CloseSubSession()
,
CreateSubSession()
,
Send()
,
SendReceive()
,
SubSessionHandle()
,
operator=()
TInt Open(RFs& aFs,const TDesC& aMatchName,TUint anEntryAttMask);
Opens a directory using an attribute bitmask to filter the directory entry types which will subsequently be read. This function, or its overload, must be called before reading the entries in the directory.
Note:
To close the directory, use Close()
, defined
in the base class RFsBase
.
|
|
TInt Open(RFs& aFs,const TDesC& aMatchName,const TUidType& aUidType);
Opens a directory using the specified UID type to filter the directory entry types which will subsequently be read. This function, or its overload, must be called before reading the entries in the directory.
Note:
To close the directory, use Close()
, defined in
the base class RFsBase
.
|
|
TInt Read(TEntryArray& anArray) const;
Reads all filtered directory entries into the array specified — synchronous overload.
Notes:
If the directory has not been opened before an attempt is made to read its contents, a panic will occur.
|
|
void Read(TEntryArray& anArray,TRequestStatus& aStatus) const;
Reads all filtered directory entries into the array specified — asynchronous overload.
Notes:
If the directory has not been opened before an attempt is made to read its contents, a panic will occur.
|
TInt Read(TEntry& anEntry) const;
Reads a single directory entry — synchronous overload.
Notes:
If the directory has not been opened before an attempt is made to read its contents, a panic will occur.
|
|
void Read(TPckg<TEntry>& anEntry,TRequestStatus& aStatus) const;
Reads a single directory entry — asynchronous overload.
Notes:
If the directory has not been opened before an attempt is made to read its contents, a panic will occur.
|