| 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 | { |