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

Method getRobocopyArg

FastCopy/RobocopyViewModel.cpp:301–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299 m_finishEvent.remove(token);
300 }
301 RobocopyArgs RobocopyViewModel::getRobocopyArg()
302 {
303 RobocopyArgs args;
304 args.destinationDir = m_destination;
305 args.moveFilesAndDirs.value = (m_recordFile->GetOperation() == CopyOperation::Move);
306 if (std::filesystem::is_directory(**m_iter))
307 {
308 args.sourceDir = **m_iter;
309 args.destinationDir += L"\\" + std::filesystem::path{ **m_iter }.filename().wstring();
310 args.copySubDirectoriesIncludeEmpty.value = true;
311 }
312 else
313 {
314 std::filesystem::path path{ **m_iter };
315 args.sourceDir = path.parent_path().wstring();
316 args.files.push_back(path.filename().wstring());
317 }
318 return args;
319 }
320
321 bool RobocopyViewModel::canUseRobocopy() const
322 {

Callers

nothing calls this directly

Calls 1

GetOperationMethod · 0.80

Tested by

no test coverage detected