|
||
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.
RSubSessionBase
- Client-side handle to a sub-session
RDir
- Reads the entries contained in a directory
Defined in RDir
:
Close()
Closes the directoryOpen()
Opens a directory using the specified UID type to filter the directory entry types that will subsequently be readOpen()
Opens a directory using an attribute bitmask to filter the directory entry types that will subsequently be readRead()
Reads all filtered directory entries into the specified arrayRead()
Reads all filtered directory entries into the specified arrayRead()
Reads a single directory entryRead()
Reads a single directory entryInherited from RSubSessionBase
:
CloseSubSession()
Closes the sub-sessionCreateAutoCloseSubSession()
Creates a new sub-session within an existing sessionCreateSubSession()
Creates a new sub-session within an existing sessionSend()
Sends a blind message to the server - no reply is expectedSendReceive()
Sends a message to the server and waits asynchronously for the replySession()
Returns a copy of the session associated with this sub-sessionSubSessionHandle()
Gets the sub-session handle numberRFs
A handle to a file server sessionCapability: | AllFiles |
IMPORT_C TInt Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType);
Opens a directory using the specified UID type to filter the directory entry types that 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()
|
|
Capability: | AllFiles |
IMPORT_C TInt Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask);
Opens a directory using an attribute bitmask to filter the directory entry types that 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()
|
|
KEntryAttNormal
File/directory attribute: any file without the hidden or system attributeIMPORT_C void Close();
Closes the directory.
Any open files are closed when the file server session is closed.
Close()
is guaranteed to return, and provides no indication whether it completed successfully or not.
IMPORT_C TInt Read(TEntryArray &anArray) const;
Reads all filtered directory entries into the specified array.
This is a synchronous function that returns when the operation is complete.
|
|
IMPORT_C void Read(TEntryArray &anArray, TRequestStatus &aStatus) const;
Reads all filtered directory entries into the specified array.
This is an asynchronous function.
|
IMPORT_C TInt Read(TEntry &anEntry) const;
Reads a single directory entry.
This is a synchronous function that returns when the operation is complete.
|
|
IMPORT_C void Read(TPckg< TEntry > &anEntry, TRequestStatus &aStatus) const;
Reads a single directory entry.
This is an asynchronous function.
|