| 1 | // Copyright (C) Microsoft Corporation. All rights reserved. |
| 2 | |
| 3 | #include "ContainerCommand.h" |
| 4 | #include "CLIExecutionContext.h" |
| 5 | #include "ContainerTasks.h" |
| 6 | #include "SessionTasks.h" |
| 7 | #include "Task.h" |
| 8 | |
| 9 | using namespace wsl::windows::wslc::execution; |
| 10 | using namespace wsl::windows::wslc::task; |
| 11 | using namespace wsl::shared; |
| 12 | |
| 13 | namespace wsl::windows::wslc { |
| 14 | // Container Cp Command |
| 15 | std::vector<Argument> ContainerCpCommand::GetArguments() const |
| 16 | { |
| 17 | return { |
| 18 | Argument::Create(ArgType::Archive), |
| 19 | Argument::Create(ArgType::Source, {.Required = true, .Desc = Localization::WSLCCLI_CpSourceArgDescription()}), |
| 20 | Argument::Create(ArgType::Target, {.Required = true, .Desc = Localization::WSLCCLI_CpTargetArgDescription()}), |
| 21 | }; |
| 22 | } |
| 23 | |
| 24 | std::wstring ContainerCpCommand::ShortDescription() const |
| 25 | { |
| 26 | return Localization::WSLCCLI_ContainerCpDesc(); |
| 27 | } |
| 28 | |
| 29 | std::wstring ContainerCpCommand::LongDescription() const |
| 30 | { |
| 31 | return Localization::WSLCCLI_ContainerCpLongDesc(); |
| 32 | } |
| 33 | |
| 34 | void ContainerCpCommand::ExecuteInternal(CLIExecutionContext& context) const |
| 35 | { |
| 36 | context // |
| 37 | << ResolveSession // |
| 38 | << ContainerCp; |
| 39 | } |
| 40 | } // namespace wsl::windows::wslc |