Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
RDir Class Reference

Reads the entries contained in a directory. More...

#include <f32file.h>

Inheritance diagram for RDir:
RSubSessionBase

Public Member Functions

EFSRV_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.
 
EFSRV_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.
 
EFSRV_IMPORT_C void Close ()
 Closes the directory.
 
EFSRV_IMPORT_C TInt Read (TEntryArray &anArray) const
 Reads all filtered directory entries into the specified array.
 
EFSRV_IMPORT_C void Read (TEntryArray &anArray, TRequestStatus &aStatus) const
 Reads all filtered directory entries into the specified array.
 
EFSRV_IMPORT_C TInt Read (TEntry &anEntry) const
 Reads a single directory entry.
 
EFSRV_IMPORT_C void Read (TPckg< TEntry > &anEntry, TRequestStatus &aStatus) const
 Reads a single directory entry.
 
- Public Member Functions inherited from RSubSessionBase
TInt SubSessionHandle () const
 Gets the sub-session handle number.
 

Friends

class RDirPlugin
 

Additional Inherited Members

- Protected Member Functions inherited from RSubSessionBase
 RSubSessionBase ()
 Default constructor.
 
IMPORT_C const RSessionBase Session () const
 Returns a copy of the session associated with this sub-session.
 
TInt CreateSubSession (const RSessionBase &aSession, TInt aFunction, const TIpcArgs &aArgs)
 Creates a new sub-session within an existing session.
 
TInt CreateSubSession (const RSessionBase &aSession, TInt aFunction)
 Creates a new sub-session within an existing session.
 
IMPORT_C TInt CreateAutoCloseSubSession (RSessionBase &aSession, TInt aFunction, const TIpcArgs &aArgs)
 Creates a new sub-session within an existing session.
 
IMPORT_C void CloseSubSession (TInt aFunction)
 Closes the sub-session.
 
TInt Send (TInt aFunction, const TIpcArgs &aArgs) const
 Sends a blind message to the server - no reply is expected.
 
void SendReceive (TInt aFunction, const TIpcArgs &aArgs, TRequestStatus &aStatus) const
 Sends a message to the server and waits asynchronously for the reply.
 
TInt SendReceive (TInt aFunction, const TIpcArgs &aArgs) const
 Sends a message to the server and waits synchronously for a reply.
 
TInt Send (TInt aFunction) const
 Sends a blind message to the server - no reply is expected.
 
void SendReceive (TInt aFunction, TRequestStatus &aStatus) const
 Sends a message to the server and waits asynchronously for the reply.
 
TInt SendReceive (TInt aFunction) const
 Sends a message to the server and waits synchronously for a reply.
 

Detailed Description

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.

See also
RFs
API status
Published to all clients. Released API.

Definition at line 2586 of file f32file.h.

Member Function Documentation

◆ Close()

EFSRV_IMPORT_C void RDir::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.

(generated from Symbian Developer Library)

◆ Open() [1/2]

EFSRV_IMPORT_C TInt RDir::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()

Parameters
aFsThe file server session.
aMatchNameName of the directory to be opened. Any path components that are not specified here are taken from the session path. Note that the wildcard characters ? and * can be used. As with all directory paths aName must be terminated with '\', Please refer to "Structure of paths and filenames" section in the Symbian OS Library.
aUidTypeUID type used by the Read() functions to filter the entry types required. Only those entries with the UID type specified here will be read.
capability
AllFiles

(generated from Symbian Developer Library)

◆ Open() [2/2]

EFSRV_IMPORT_C TInt RDir::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()

Parameters
aFsThe file server session.
aMatchNameName of the directory to be opened. Any path components that are not specified here are taken from the session path. Note that the wildcard characters ? and * can be used. As with all directory paths aName must be terminated with '\', Please refer to "Structure of paths and filenames" section in the Symbian OS Library.
anAttMaskAn attribute mask used by the Read() functions to filter the entry types required. Only those entries with the attributes specified here will be read. See KEntryAttNormal, and the other file or directory attributes.
capability
AllFiles

(generated from Symbian Developer Library)

◆ Read() [1/4]

EFSRV_IMPORT_C TInt RDir::Read ( TEntry &  anEntry) const

Reads a single directory entry.

This is a synchronous function that returns when the operation is complete.

Parameters
anEntryOn successful return, contains a directory entry.

(generated from Symbian Developer Library)

◆ Read() [2/4]

EFSRV_IMPORT_C TInt RDir::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.

Parameters
anArrayOn successful return, contains filtered entries from the directory.

(generated from Symbian Developer Library)

◆ Read() [3/4]

EFSRV_IMPORT_C void RDir::Read ( TEntryArray &  anArray,
TRequestStatus &  aStatus 
) const

Reads all filtered directory entries into the specified array.

This is an asynchronous function.

Parameters
anArrayOn request completion, contains filtered entries from the directory.
aStatusThe request status object. On completion, this will contain: KErrNone, if the read operation is successful - the end of the directory has not yet been reached, and there may be more entries to be read; KErrEof, if the read operation is successful - all the entries in the directory have been read, and anArray contains the final set of entries; otherwise one of the other system-wide error codes (e.g. KErrCorrupt, KErrNoMemory etc).

(generated from Symbian Developer Library)

◆ Read() [4/4]

EFSRV_IMPORT_C void RDir::Read ( TPckg< TEntry > &  anEntry,
TRequestStatus &  aStatus 
) const

Reads a single directory entry.

This is an asynchronous function.

Parameters
anEntryOn request completion, contains a directory entry.
aStatusThe request status object. On request completion, contains: KErrNone, if successful; otherwise one of the other system-wide error codes.

(generated from Symbian Developer Library)

Friends And Related Symbol Documentation

◆ RDirPlugin

friend class RDirPlugin
friend

Definition at line 2632 of file f32file.h.


The documentation for this class was generated from the following files: