| 505 | } |
| 506 | |
| 507 | SC::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 | |
| 521 | SC::Result SC::FileSystem::copyDirectories(Span<const CopyOperation> sourceDestination) |
| 522 | { |