cp:support -r recursive copies

The cp command supports recursive copying. Use "cp -r" to copy a folder.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
chenrun1
2024-01-16 20:42:08 +08:00
committed by Xiang Xiao
parent 9e71031a09
commit e8470f7d0e
2 changed files with 254 additions and 151 deletions

View File

@@ -169,7 +169,7 @@ static const struct cmdmap_s g_cmdmap[] =
#endif
#ifndef CONFIG_NSH_DISABLE_CP
CMD_MAP("cp", cmd_cp, 3, 3, "<source-path> <dest-path>"),
CMD_MAP("cp", cmd_cp, 3, 4, "[-r] <source-path> <dest-path>"),
#endif
#ifndef CONFIG_NSH_DISABLE_CMP