本文整理汇总了C++中TFileName::Delete方法的典型用法代码示例。如果您正苦于以下问题:C++ TFileName::Delete方法的具体用法?C++ TFileName::Delete怎么用?C++ TFileName::Delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TFileName
的用法示例。
在下文中一共展示了TFileName::Delete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AppendMainLogL
TInt CTestUtils::AppendMainLogL()
{
_LIT(KDisplayLogFile,"Log File %S\n");
TParse loglocation;
TFileName logfile;
TInt err=ResolveLogFile(KNullDesC, loglocation);
if(err!=KErrNone)
{
iFs.MkDirAll(KMsvTestFileDefaultOutputBase);
err=ResolveLogFile(KNullDesC, loglocation);
}
User::LeaveIfError(err);
logfile.Copy(loglocation.FullName());
logfile.Delete(logfile.Length()-1,1);
AppendVariantName(logfile);
iRTest.Printf(KDisplayLogFile, &logfile);
iFs.MkDirAll(logfile);
iLogBuf=HBufC::NewL(KMaxLogLineLength);
iLogBuf8=HBufC8::NewL(KMaxLogLineLength);
TInt pos=0;
TInt ret=KErrNone;
ret=iFile.Open(iFs,logfile,EFileWrite|EFileShareAny);
if (ret==KErrNotFound)
ret=iFile.Create(iFs,logfile,EFileWrite|EFileShareAny);
if (ret==KErrNone)
return(iFile.Seek(ESeekEnd,pos));
else
return(ret);
}
示例2: OpenMainLogL
TInt CTestUtils::OpenMainLogL()
{
_LIT(KDisplayLogFile,"Log File %S\n");
TParse loglocation;
TFileName logfile;
TInt err=ResolveLogFile(KNullDesC, loglocation);
if(err!=KErrNone)
{
TChar driveChar=RFs::GetSystemDriveChar();
TBuf<2> systemDrive;
systemDrive.Append(driveChar);
systemDrive.Append(KDriveDelimiter);
TPath pathName(systemDrive) ;
pathName.Append(KMsvTestFileDefaultOutputBase);
iFs.MkDirAll(pathName);
err=ResolveLogFile(KNullDesC, loglocation);
}
User::LeaveIfError(err);
logfile.Copy(loglocation.FullName());
logfile.Delete(logfile.Length()-1,1);
AppendVariantName(logfile);
iRTest.Printf(KDisplayLogFile, &logfile);
iFs.MkDirAll(logfile);
iLogBuf=HBufC::NewL(KMaxLogLineLength);
iLogBuf8=HBufC8::NewL(KMaxLogLineLength);
return(iFile.Replace(iFs,logfile,EFileWrite|EFileShareAny));
}