Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <ccacheddriveInfo.h>
Link against: bsul.lib
This item is not part of the S60 5th Edition SDK

Class BSUL::CCachedDriveInfo

class CCachedDriveInfo : public CBase;

Description

Class used to cache F32 drive information.

Derivation

Members

Defined in BSUL::CCachedDriveInfo:

Inherited from CBase:


Construction and destruction


NewL(RFs &)

IMPORT_C static CCachedDriveInfo* NewL(RFs &aFs);

Description

Constructs BSUL::CCachedDriveInfo object by retrieving the drive status using aFs

Parameters

RFs &aFs

Reference to connected filesystem

Return value

BSUL::CCachedDriveInfo *


NewLC(RFs &)

IMPORT_C static CCachedDriveInfo* NewLC(RFs &aFs);

Description

Constructs BSUL::CCachedDriveInfo object by retrieving the drive status using aFs

Parameters

RFs &aFs

Reference to connected filesystem

Return value

BSUL::CCachedDriveInfo *


~CCachedDriveInfo()

IMPORT_C ~CCachedDriveInfo();

Description

Frees all allocated resources

[Top]


Member functions


IsReadOnlyInternalL(const TDesC &)const

IMPORT_C TBool IsReadOnlyInternalL(const TDesC &aFullName) const;

Description

Checks if the drive associated with aFullName is both read-only and internal by checking that the KMediaAttWriteProtected and KDriveAttInternal flags are both set.

Parameters

const TDesC16 &aFullName

File name that includes a drive

Return value

TBool

Returns ETrue if the drive is read-only and internal, EFalse otherwise (including when the drive is not mounted)

Leave codes

Leaves

with a system-wide error code if the aFullName cannot be parsed, or with KErrBadName if the supplied path does not contain a drive letter


IsReadOnlyInternalL(TDriveUnit)const

IMPORT_C TBool IsReadOnlyInternalL(TDriveUnit aDrive) const;

Description

Checks if the specified drive is both read-only and internal by checking that the KMediaAttWriteProtected and KDriveAttInternal flags are both set.

Parameters

TDriveUnit aDrive

The drive whose read-only status is being retrieved

Return value

TBool

Returns ETrue if the drive is read-only and internal, EFalse otherwise (including when the drive is not mounted)

Leave codes

Leaves

with KErrBadName if aDrive is not a valid drive between EDriveA and EDriveZ


IsFlagSetOnDriveL(TDriveUnit,TUint)const

IMPORT_C TBool IsFlagSetOnDriveL(TDriveUnit aDrive, TUint aFlags) const;

Description

This method allows the caller to test the attributes of a drive to see if they are set. For example, a drive can be check whether it is remote by checking the flag KDriveAttRemote is set. Valid flags are those defined in e32const.h starting KDriveAtt*

Parameters

TDriveUnit aDrive

The drive whose attribute information is being tested

TUint aFlags

The attributes to be checked for the drive

Return value

TBool

ETrue if attributes in the drive are set, EFalse otherwise

Leave codes

KErrBadName

if aDrive is not a valid drive between EDriveA and EDriveZ


MediaTypeL(TDriveUnit,TMediaType,TMediaType *)const

IMPORT_C TBool MediaTypeL(TDriveUnit aDrive, TMediaType aTestValue, TMediaType *aActual=0) const;

Description

This method allows the caller to check the media type of a drive, to see if a drive is of a particular media type. It also optionally returns the media type of the drive.

Parameters

TDriveUnit aDrive

The drive whose media type information is being checked.

TMediaType aTestValue

The media type to compare against the drive provided.

TMediaType *aActual

return parameter - if the caller provides a pointer for this parameter type, then it will be populated with the actual media type of the drive. This is useful to avoid repeated queries if the media type is needed.

Return value

TBool

ETrue if the drive media type matches the media type provided

Leave codes

KErrBadName

if aDrive is not a valid drive between EDriveA and EDriveZ


GetDefaultRemovableMemoryCardDriveL()const

IMPORT_C TDriveUnit GetDefaultRemovableMemoryCardDriveL() const;

Description

This method fetches the default removable memory card (MMC card). To determine the MMC drive a default algorithm will be used.

The algorithm to be used will be to search through the drive list provided by RFs for the first drive that has the following properties 1) Drive type is EMediaHardDisk 2) Drive attributes are KDriveAttRemovable and KDriveAttLocal

Return value

TDriveUnit

TDriveUnit The drive found by the algorithm

Leave codes

KErrNotFound

if drive not found