本文整理汇总了C++中TPath::Copy方法的典型用法代码示例。如果您正苦于以下问题:C++ TPath::Copy方法的具体用法?C++ TPath::Copy怎么用?C++ TPath::Copy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TPath
的用法示例。
在下文中一共展示了TPath::Copy方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddDrivePathsL
// ---------------------------------------------------------------------------
// CAknMemorySelectionDialogMultiDrive::AddDrivePathsL
// ---------------------------------------------------------------------------
//
EXPORT_C TInt CAknMemorySelectionDialogMultiDrive::AddDrivePathsL(
const TDesC& aRootPath,
const TDesC& aDefaultFolder
)
{
// TODO: Verify paramters if they are valid.
TInt rootPathCount=iRootPathArray.Count();
TInt result = KErrNone;
TPath path;
for ( TInt i=0;i<rootPathCount;i++ )
{
path.Copy( iRootPathArray[i] );
path.Append( aRootPath );
AknCFDUtility::AddTrailingBackslash( path );
iRootPathArray.Delete(i);
iRootPathArray.Compress();
iRootPathArray.InsertL( i, path );
path.Copy( aDefaultFolder );
AknCFDUtility::AddTrailingBackslash( path );
iDefaultFolderArray.Delete(i);
iDefaultFolderArray.Compress();
iDefaultFolderArray.InsertL( i, path );
}
return result;
}
示例2: ReadUserDefinedDataL
// ---------------------------------------------------------------------------
// CAknMemorySelectionModelMultiDrive::ReadUserDefinedDataL
// ---------------------------------------------------------------------------
//
void CAknMemorySelectionModelMultiDrive::ReadUserDefinedDataL(
TResourceReader& aReader, TInt aLocations )
{
if ( aLocations <= 0)
{
return;
}
iDefDriveArray = new ( ELeave ) CDesCArrayFlat( aLocations );
iDefDefaultFolderArray = new ( ELeave ) CDesCArrayFlat( aLocations );
for ( TInt i = 0; i < aLocations; i++ )
{
// read the location, save path and default folder in array
TPath temp;
temp.Copy( aReader.ReadTPtrC() );
iDefDriveArray->AppendL( temp );
temp.Copy( aReader.ReadTPtrC() );
iDefDefaultFolderArray->AppendL( temp );
}
}