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


C++ TFsPluginRequest::Dest方法代码示例

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


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

示例1: FsRenameL

void CPreModifierPlugin::FsRenameL(TFsPluginRequest& aRequest)
	{
	TInt err = KErrNone;
	TFileName oldfilename;
	TFileName newfilename;

	oldfilename = aRequest.Src().FullName();
	newfilename = aRequest.Dest().FullName();

	TBuf<256> testfilename1;

	//setting up test files
	testfilename1.Append(iDriveToTest);
	testfilename1.Append(_L(":\\Data\\test.txt"));

	if (aRequest.IsPostOperation())
		{
		_LOG(_L("CPreModifierPlugin::FsRenameL, post intercept"));
		RFilePlugin fileplugin2(aRequest);
		//open a second file
		err = fileplugin2.Open(testfilename1, EFileWrite);
		_LOG3(_L("CPreModifierPlugin::FsRenameL, RFilePlugin::Open for %S returned %d"), &testfilename1, err);
		iLastError = err;
		iLineNumber = __LINE__;
		if(err!=KErrNone)
			User::Leave(err); //trapped in DoRequestL
								
		TInt64 size=0;
		err = fileplugin2.Size(size);
		iLastError = err;
		iLineNumber = __LINE__;
		if(err!=KErrNone)
			User::Leave(err); //trapped in DoRequestL		

		//close the second file
		fileplugin2.Close();
		_LOG2(_L("CPreModifierPlugin::FsRenameL, RFilePlugin::Close to the second file returned %d"), err);
		}
	else
		{
		User::Invariant();
		}
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:43,代码来源:premodifier_plugin.cpp

示例2: FsFileRenameL

/**
@internalComponent
*/
void CPreModifierPlugin::FsFileRenameL(TFsPluginRequest& aRequest)
	{
	TFileName oldfilename, newfilename;
	TParse parse;

	oldfilename = aRequest.Src().FullName();
	newfilename = aRequest.Dest().FullName();
	
    parse.Set(oldfilename, NULL, NULL);
	TPtrC extension(parse.Ext());

	_LOG3(_L("CPreModifierPlugin::FsFileRenameL, old name: %S, new name: %S"), &oldfilename, &newfilename);
	
	if (aRequest.IsPostOperation())
		{
		_LOG(_L("CPreModifierPlugin::FsFileRenameL, post intercept"));

		if (extension.CompareF(_L(".tst")) == 0)
			{
			TBuf8<32> tempBuf = (_L8("Rename Post Intercept"));
			RFilePlugin fileplugin(aRequest);
			TInt err = fileplugin.AdoptFromClient();
			iLastError = err;
			iLineNumber = __LINE__;
			if(err!=KErrNone)
				User::Leave(err); //trapped in DoRequestL

			err = fileplugin.Write(20, tempBuf);
			_LOG2(_L("CPreModifierPlugin::FsFileRenameL, FileWrite returned %d"), err);
			iLastError = err;
			iLineNumber = __LINE__;
			if(err!=KErrNone)
				User::Leave(err); //trapped in DoRequestL
			fileplugin.Close();
			}
		}
	else
		{
			User::Invariant();
		}
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:44,代码来源:premodifier_plugin.cpp

示例3: FsReplaceL

void CPreModifierPlugin::FsReplaceL(TFsPluginRequest& aRequest)
	{
	TFileName oldfilename;
	TFileName newfilename;

	oldfilename = aRequest.Src().FullName();
	newfilename = aRequest.Dest().FullName();

	TBuf<256> testfilename1;

	//setting up test files
	testfilename1.Append(iDriveToTest);
	testfilename1.Append(_L(":\\Data\\test.txt"));

    	
	if (aRequest.IsPostOperation())
		{
		//STF: Is this code going to get called - the pre-operation completes early?

		_LOG(_L("CPreModifierPlugin::FsReplaceL, post intercept"));
		//We should check that the name has changed here.
		RFilePlugin file(aRequest);
		TInt err = file.AdoptFromClient();
		iLastError = err;
		iLineNumber = __LINE__;
		if(err!=KErrNone)
			User::Leave(err); //trapped in DoRequestL

		TInt compare = oldfilename.Compare(newfilename);
		if(compare != 0) //is equal
			{
			//User::Leave(compare);
			//It wont be equal as the name is coming from the request aint it.
			//Pointless comparison then eh?
			}

		file.Close();

		RFilePlugin fileplugin2(aRequest);
		//open a second file
		err = fileplugin2.Open(testfilename1, EFileWrite);
		_LOG3(_L("CPreModifierPlugin::FsReplaceL, RFilePlugin::Open for %S returned %d"), &testfilename1, err);
		iLastError = err;
		iLineNumber = __LINE__;
		if(err!=KErrNone)
			User::Leave(err); //trapped in DoRequestL
								
		TInt64 size=0;
		err =fileplugin2.Size(size);
		iLastError = err;
		iLineNumber = __LINE__;
		if(err!=KErrNone)
			User::Leave(err); //trapped in DoRequestL

		//close the second file
		fileplugin2.Close();
		_LOG2(_L("CPreModifierPlugin::FsReplaceL, RFilePlugin::Close to the second file returned %d"), err);
		}
	else
		{
		User::Invariant();
		}
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:63,代码来源:premodifier_plugin.cpp


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