本文整理汇总了C++中CFileOperationJob::GetCurrentFile方法的典型用法代码示例。如果您正苦于以下问题:C++ CFileOperationJob::GetCurrentFile方法的具体用法?C++ CFileOperationJob::GetCurrentFile怎么用?C++ CFileOperationJob::GetCurrentFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFileOperationJob
的用法示例。
在下文中一共展示了CFileOperationJob::GetCurrentFile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: item
TEST(TestFileOperationJob, GetFunctions)
{
XFILE::CFile *tmpfile;
CStdString tmpfilepath, destpath, destfile;
CFileItemList items;
CFileOperationJob job;
ASSERT_TRUE((tmpfile = XBMC_CREATETEMPFILE("")));
tmpfilepath = XBMC_TEMPFILEPATH(tmpfile);
tmpfile->Close();
CFileItemPtr item(new CFileItem(tmpfilepath));
item->SetPath(tmpfilepath);
item->m_bIsFolder = false;
item->Select(true);
items.Add(item);
URIUtils::GetDirectory(tmpfilepath, destpath);
destpath = URIUtils::AddFileToFolder(destpath, "getfunctions");
destfile = URIUtils::AddFileToFolder(destpath, URIUtils::GetFileName(tmpfilepath));
ASSERT_FALSE(XFILE::CFile::Exists(destfile));
job.SetFileOperation(CFileOperationJob::ActionCopy, items, destpath);
EXPECT_EQ(CFileOperationJob::ActionCopy, job.GetAction());
EXPECT_TRUE(job.DoWork());
EXPECT_TRUE(XFILE::CFile::Exists(tmpfilepath));
EXPECT_TRUE(XFILE::CFile::Exists(destfile));
std::cout << "GetAverageSpeed(): " << job.GetAverageSpeed() << std::endl;
std::cout << "GetCurrentOperation(): " << job.GetCurrentOperation() << std::endl;
std::cout << "GetCurrentFile(): " << job.GetCurrentFile() << std::endl;
EXPECT_FALSE(job.GetItems().IsEmpty());
EXPECT_TRUE(XBMC_DELETETEMPFILE(tmpfile));
EXPECT_TRUE(XFILE::CFile::Delete(destfile));
EXPECT_TRUE(XFILE::CDirectory::Remove(destpath));
}