CDirCB Class Reference

class CDirCB : public CFsDispatchObject

A file server interface class representing an open directory

An instance of this object is referred to as a directory control block.

A directory control block must be created for a specific directory to access that directory within a volume.

A plug-in file system implements this class.

Constructor & Destructor Documentation

CDirCB()

IMPORT_CCDirCB()

~CDirCB()

IMPORT_C~CDirCB()

Member Functions Documentation

CheckMount()

TInt CheckMount()

Drive()

TDrive &Drive()const [inline]

Gets a reference to the object representing the drive on which the directory resides.

GetInterface(TInt, TAny *&, TAny *)

IMPORT_C TIntGetInterface(TIntaInterfaceId,
TAny *&aInterface,
TAny *aInput
)[protected, virtual]

Return a pointer to a specified interface extension - to allow future extension of this class without breaking binary compatibility.

Parameters

TInt aInterfaceIdInterface identifier of the interface to be retrieved.
TAny *& aInterfaceA reference to a pointer that retrieves the specified interface.
TAny * aInputAn arbitrary input argument.

InitL(TDrive *)

IMPORT_C voidInitL(TDrive *aDrive)

Parameters

TDrive * aDrive

Mount()

CMountCB &Mount()const [inline]

Gets a reference to the object representing the mount on which the directory resides.

Pending()

TBool Pending()const [inline]

Tests whether the preceding entry details should be returned when multiple entries are being read.

ReadL(TEntry &)

voidReadL(TEntry &anEntry)[pure virtual]

Gets information from the first suitable entry in the directory, starting from the current read position.

The function should read successive entries until a suitable entry is found. An entry is suitable if the entry attributes match the criteria set by this object's attributes, which are set on initialisation. For example, if the directory control block has the attribute KEntryAttMaskSupported, and the file has the attribute KEntryAttVolume, then the entry will be deemed unsuitable and the next entry will be read.

This function is called by the file server.

If, on return, the entry's full file name, TEntry::iName, is longer than the maximum buffer size, then the entry cannot be returned to the client. In this case the file server will set iPending to true and will call StoreLongEntryName() before calling this function again. In this case (when iPending is true), the function should re-read the last entry to be read; it should also set iPending to false and should not advance the current read position.

The time stored in the iModified member of anEntry should not be converted, but left as UTC time.

When storing the iName member of anEntry, the current (.), or parent marker (..) in the directory should not be returned.

If the KEntryAttAllowUid flag is set in the iAtt member of anEntry, then the entry UID type of an entry will be read. If, on reading the UID from a file, KErrCorrupt is generated, because the file is corrupt, ReadL() should not leave with this error message, but should return as normal. If any other errors are raised the function should leave.

All of the properties of a TEntry, other than the UID types, are always read.

ReadL() should leave with a suitable error code if it cannot complete successfully for any reason.

Parameters

TEntry & anEntryEntry information object.

SetMount(CMountCB *)

voidSetMount(CMountCB *aMount)[inline]

Parameters

CMountCB * aMount

SetPending(TBool)

voidSetPending(TBoolaPending)[inline]

Sets whether the preceding entry details should be returned when multiple entries are being read.

Parameters

TBool aPendingETrue if the preceding entry details should be returned; EFalse otherwise.

StoreLongEntryNameL(const TDesC &)

IMPORT_C voidStoreLongEntryNameL(const TDesC &aName)[virtual]

Parameters

const TDesC & aName

Member Data Documentation

TUint iAtt

TUint iAtt[protected]

Bitmask of the attributes of interest.

Set using the the TDrive friend class instance representing the directory's drive after the object is made.

TDrive * iDrive

TDrive *iDrive[private]

CMountCB * iMount

CMountCB *iMount[private]

TBool iPending

TBool iPending[protected]

Flag to indicate whether preceding entry details should be returned when multiple entries are being read.

TUint32 iReserved

TUint32 iReserved[private]

TUidType iUidType

TUidType iUidType[protected]

Set after construction using the TDrive friend class instance representing the directory's drive.