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

Method copyDirectories

Libraries/FileSystem/FileSystem.cpp:521–535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519}
520
521SC::Result SC::FileSystem::copyDirectories(Span<const CopyOperation> sourceDestination)
522{
523 if (currentDirectory.view().isEmpty())
524 return Result(false);
525 for (const CopyOperation& op : sourceDestination)
526 {
527 StringSpan encodedPath1;
528 StringSpan encodedPath2;
529 SC_TRY(convert(op.source, fileFormatBuffer1, fileTransportBuffer1, &encodedPath1));
530 SC_TRY(convert(op.destination, fileFormatBuffer2, fileTransportBuffer2, &encodedPath2));
531 SC_TRY_FORMAT_NATIVE(op.source,
532 FileSystem::Operations::copyDirectory(encodedPath1, encodedPath2, op.copyFlags));
533 }
534 return Result(true);
535}
536
537SC::Result SC::FileSystem::removeEmptyDirectories(Span<const StringSpan> directories)
538{

Callers

nothing calls this directly

Calls 4

copyDirectoryFunction · 0.85
ResultClass · 0.50
isEmptyMethod · 0.45
viewMethod · 0.45

Tested by

no test coverage detected