Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: f32file.h
Link against: efsrv.lib

Class CDir

CDir

Support

Supported from 5.0

Description

Array of directory entries that has been read into memory from the file system — abstract base class. It can be read and sorted by user programs, but cannot be created by them.

This class is not intended for user derivation.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CDirArray of directory entries that has been read into memory from the file system -- abstract base class

Defined in CDir:
Count(), NewL(), Sort(), operator[](), ~CDir()

Inherited from CBase:
operator new()


Construction and destruction


NewL()

protected: static CDir* NewL();

Description

Allocates and constructs a directory object. This function is protected, which prevents objects of this class from being constructed.

Return value

CDir*

A pointer to the newly created object


~CDir()

virtual ~CDir();

Description

Frees all resources owned by the object, prior to its destruction.

[Top]


Extracting information


Count()

TInt Count() const;

Description

Returns the number of entries in the array of directory entries.

Return value

Tint

The number of entries in the array.


operator[]()

const TEntry& operator[](TInt anIndex) const;

Description

Returns an entry from the array.

Parameters

TInt anIndex

Index of the desired entry within the array.

Return value

TEntry&

A directory entry.

[Top]


Sorting


Sort()

TInt Sort(TUint aEntrySortKey);

Description

Sorts the array of directory entries.

Parameters

TUint aEntrySortKey

Indicates how the directory entries are to be sorted. This flag is defined in TEntryKey.

Return value

TInt

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