当前位置: 首页>>代码示例>>C++>>正文


C++ TFileName::UpperCase方法代码示例

本文整理汇总了C++中TFileName::UpperCase方法的典型用法代码示例。如果您正苦于以下问题:C++ TFileName::UpperCase方法的具体用法?C++ TFileName::UpperCase怎么用?C++ TFileName::UpperCase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TFileName的用法示例。


在下文中一共展示了TFileName::UpperCase方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetDriveLetters

LOCAL_C void GetDriveLetters()
	{
// Assign the first drive that matches the required criteria
	test.Next(_L("T_DENYCLAMP - GetDriveLetters()"));

	TDriveList driveList;
	TDriveInfo driveInfo;
	TInt r=TheFs.DriveList(driveList);
	test(r==KErrNone);
	TInt drvNum;
	TBool drivesFound = EFalse;
	for(drvNum=0; (drvNum<KMaxDrives) && !drivesFound; drvNum++)
		{
		TChar drvLetter='?';
		TFileName fileSystem;
		if(!driveList[drvNum])
			continue;
		test(TheFs.Drive(driveInfo, drvNum) == KErrNone);
		test(TheFs.DriveToChar(drvNum,drvLetter) == KErrNone);
		r=TheFs.FileSystemName(fileSystem,drvNum);
		fileSystem.UpperCase();
		test((r==KErrNone)||(r==KErrNotFound));
		// Check for FAT on NAND
		if(NandFatDrv=='?')
			{
			if((driveInfo.iType==EMediaNANDFlash) && (fileSystem.Compare(KFATName)==0))
				NandFatDrv=drvLetter;
			}
		// Check for ROFS
		if(RofsDrv=='?')
			{
			if((driveInfo.iType==EMediaNANDFlash) && (fileSystem.Compare(KROFSName)==0))
				RofsDrv=drvLetter;
			}
		// Check for LFFS
		if(LffsDrv=='?')
			{
			if((driveInfo.iType==EMediaFlash) && (fileSystem.Compare(KLFFSName)==0))
				LffsDrv=drvLetter;
			}
		// Check for CompFSys
		if(CompDrv=='?')
			{
			if((driveInfo.iType==EMediaRom) && ((fileSystem.Compare(KROMName)==0)||(fileSystem.Compare(KCOMPName)==0)))
				CompDrv=drvLetter;
			}
		drivesFound=((NandFatDrv!='?')&&(RofsDrv!='?')&&(LffsDrv!='?')&&(CompDrv!='?'));
		}
	if(NandFatDrv!='?')
		test((NandFatDrv!=RofsDrv)&&(NandFatDrv!=LffsDrv)&&(NandFatDrv!=CompDrv));
	if(RofsDrv!='?')
		test((RofsDrv!=LffsDrv)&&(RofsDrv!=CompDrv));
	if(LffsDrv!='?')
		test(LffsDrv!=CompDrv);

	RDebug::Printf("T_DENYCLAMP: FAT drive=%C, ROFS drive=%C, LFFS drive=%C, ROM-COMP drive=%C \n",(TText)NandFatDrv,(TText)RofsDrv,(TText)LffsDrv,(TText)CompDrv);
	return;
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:58,代码来源:t_denyclamp.cpp

示例2: DatabaseExistsL

// -----------------------------------------------------------------------------
// CPosLmLocalDatabaseManager::DatabaseExistsL
//
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
TBool CPosLmLocalDatabaseManager::DatabaseExistsL(const TDesC& aDatabaseUri)
    {
    // validate URI
    HBufC* uri = PosLmDatabaseUtility::CreateDatabaseUriL(aDatabaseUri);
    CleanupStack::PushL(uri);

    TPtrC ptr(uri->Des());
    PosLmDatabaseUtility::RemoveProtocolFromUriL(ptr);

    TParse parse;
    User::LeaveIfError(parse.Set(ptr, NULL, NULL));
    TFileName searchUri = parse.NameAndExt();
    searchUri.UpperCase();

    TInt drive;
    User::LeaveIfError(RFs::CharToDrive(parse.Drive()[0], drive));

    RDbs dbSession;
    CleanupClosePushL(dbSession);
    User::LeaveIfError(dbSession.Connect());

    CDbDatabaseNames* names = dbSession.DatabaseNamesL(
            static_cast<TDriveNumber>(drive), KPosLmDbSecureUid);
    CleanupStack::PushL(names);

    TBool exists(EFalse);
    for (TInt i = 0; i < names->Count() && !exists; i++)
        {
        HBufC* databaseName = (*names)[i].AllocLC();
        databaseName->Des().UpperCase();
        if (searchUri == *databaseName)
            {
            exists = ETrue;
            }
        CleanupStack::PopAndDestroy(databaseName);
        }

    CleanupStack::PopAndDestroy(3, uri);  //dbSession
    return exists;
    }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:46,代码来源:EPos_CPosLmLocalDatabaseManager.cpp


注:本文中的TFileName::UpperCase方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。