CDir Class Reference

#include <f32file.h>

Link against: efsrv.lib

class CDir : public CBase

Inherits from

  • CDir

    Detailed Description

    Array of directory entries that has been read into memory from the file system.

    It can be read and sorted by user programs, but cannot be created by them.

    Member Attribute Documentation

    iArray

    CArrayPakFlat< TEntry > *iArray[protected]

    Constructor & Destructor Documentation

    CDir ( )

    IMPORT_CCDir()[protected]

    Default constructor.

    ~CDir ( )

    IMPORT_C~CDir()[virtual]

    Destructor.

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

    Member Function Documentation

    AddL ( const TEntry & )

    IMPORT_C voidAddL(const TEntry &anEntry)[protected]

    Adds the specified entry to the directory.

    Note that the function can leave.

    ParameterDescription
    anEntryThe directory entry to be added.

    Compress ( )

    IMPORT_C voidCompress()[protected]

    Compresses the directory.

    This has the effect of potentially reducing the ammount of storage space required on the media for that directory and the files it contains. Some files are already compressed and will not compress further.

    A potential side effect of compression is that each file is required to be uncompressed prior to use, generally increasing the time and processing cycles required to access that file.

    Count ( )

    IMPORT_C TIntCount()const

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

    Returns: The number of entries in the array.

    ExtractL ( TBool, CDir *& )

    IMPORT_C voidExtractL(TBoolaRemove,
    CDir *&aDir
    )[protected]

    Copies all directory entries from this directory array, and adds them to a new directory array.

    The directory entries in this array can be deleted.

    Note that the function can leave.

    ParameterDescription
    aRemoveIf ETrue, the directory entries in this array are to be deleted after extraction; if EFalse, the directory entries are not to be deleted.
    aDirOn return, a pointer to a CDir object containing the extracted directory entries.

    NewL ( )

    IMPORT_C CDir *NewL()[protected, static]

    Allocates and constructs a directory object.

    This function is protected, which prevents objects of this class from being directly constructed.

    Returns: A pointer to the newly created object.

    Sort ( TUint )

    IMPORT_C TIntSort(TUintaEntrySortKey)

    Sorts the array of directory entries.

    See also: TEntryKey

    ParameterDescription
    aEntrySortKeyA set of flags describing how the directory entries are to be sorted. The set of flags is defined by TEntryKey.

    Returns: KErrNone, if successful, otherwise one of the other system-wide error codes.

    operator[] ( TInt )

    IMPORT_C const TEntry &operator[](TIntanIndex)const

    Gets an entry from the array of directory entries.

    ParameterDescription
    anIndexof the desired entry within the array.

    Returns: A directory entry.