TRomDir Class Reference

class TRomDir

A structure that describes the first part of a ROM directory.

This part of a ROM directory is a sequence of variable length entries, each describing a file or a subdirectory, in the order that the members were specified in the original obey file; the variable length entries are the TRomEntry structures that follow the iSize member.

This part of the ROM directory is followed by a structure defined by TRomDirSortInfo , which contains a pair of sorted tables suitable for a binary search.

TRomDirSortInfo

Member Functions Documentation

BinarySearch(const TDesC &, TInt, TInt, TBool)

TInt BinarySearch ( const TDesC & aName,
TInt aLengthLimit,
TInt aMode,
TBool aDir
) const

Parameters

const TDesC & aName
TInt aLengthLimit
TInt aMode
TBool aDir

EntryCount()

TInt EntryCount ( ) const [inline]

Gets the total number of files and subdirectories in the directory.

FileCount()

TInt FileCount ( ) const [inline]

Gets the number of files in the directory.

FindLeafDir(const TDesC &)

const TRomDir * FindLeafDir ( const TDesC & aPath ) const

Parameters

const TDesC & aPath

SortInfo()

const TRomDirSortInfo * SortInfo ( ) const [inline]

Gets a pointer to the start of the second part of the ROM directory, as described by the TRomDirSortInfo structure.

SortedEntry(TInt)

const TRomEntry * SortedEntry ( TInt aIndex ) const [inline]

Gets the TRomEntry corresponding to the file or directory located at the specified index position within the sorted tables.

Parameters

TInt aIndex The index of the entry within the sorted tables. Note that for the purpose of this function, the two tables are treated as one single table.

SubDirCount()

TInt SubDirCount ( ) const [inline]

Gets the number of subdirectories in the directory.

Member Data Documentation

TRomEntry iEntry

TRomEntry iEntry

A variable number of entries, each of which describes a file or a directory.

Each entry is 4-byte aligned, and may have padding to ensure that the entry is 4-bye aligned.

TInt iSize

TInt iSize

The number of bytes occupied by the set of TRomEntry structures that follow this field.

TRomDir::iEntry