MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / copyFiles

Method copyFiles

Libraries/FileSystem/FileSystem.cpp:507–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

505}
506
507SC::Result SC::FileSystem::copyFiles(Span<const CopyOperation> sourceDestination)
508{
509 if (currentDirectory.view().isEmpty())
510 return Result(false);
511 StringSpan encodedPath1, encodedPath2;
512 for (const CopyOperation& op : sourceDestination)
513 {
514 SC_TRY(convert(op.source, fileFormatBuffer1, fileTransportBuffer1, &encodedPath1));
515 SC_TRY(convert(op.destination, fileFormatBuffer2, fileTransportBuffer2, &encodedPath2));
516 SC_TRY_FORMAT_NATIVE(op.source, FileSystem::Operations::copyFile(encodedPath1, encodedPath2, op.copyFlags));
517 }
518 return Result(true);
519}
520
521SC::Result SC::FileSystem::copyDirectories(Span<const CopyOperation> sourceDestination)
522{

Callers

nothing calls this directly

Calls 4

copyFileFunction · 0.85
ResultClass · 0.50
isEmptyMethod · 0.45
viewMethod · 0.45

Tested by

no test coverage detected