MCPcopy Create free account
hub / github.com/HO-COOH/FastCopy / FillSource

Function FillSource

UnitTest/UnitTest.cpp:95–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93
94 template<typename FileNameType, size_t N>
95 void FillSource(winrt::FastCopy::XCopyViewModel& viewModel, std::array<FileNameType, N> const& files, bool isFile = true)
96 {
97 for (auto const& file : files)
98 {
99 if constexpr (StdString<FileNameType>)
100 {
101 viewModel.Sources().Append(winrt::FastCopy::ExplorerItem{ winrt::to_hstring(file), isFile? winrt::FastCopy::ExplorerItemType::File : winrt::FastCopy::ExplorerItemType::Folder });
102 }
103 else if constexpr(WideString<FileNameType>)
104 {
105 viewModel.Sources().Append(winrt::FastCopy::ExplorerItem{ file, isFile ? winrt::FastCopy::ExplorerItemType::File : winrt::FastCopy::ExplorerItemType::Folder });
106 }
107 }
108 }
109
110 TEST_CLASS(XCopyParser)
111 {

Callers 1

TEST_METHODFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected